【IdeaVim】.ideavimrc 个人配置参考

.Ideavim 配置参考

记录一下个人使用的 Pycharm IdeaVim .ideavimrc文件内容:

" .ideavimrc is a configuration file for IdeaVim plugin. It uses
"   the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc


"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" set clipboard=unnamed,unnamedplus
set clipboard=""

" Do incremental searching.
set incsearch
set ignorecase
set hlsearch
set which-key
set notimeout
set surround
set keep-english-in-normal
set textobj-indent
set history=200
let mapleader = " "

" Don't use Ex mode, use Q for formatting.
map Q gq

" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins

" Highlight copied text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'


"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)
nnoremap U <Esc><C-r>
nnoremap <Leader>y "+y
nnoremap <Leader>p "+p
nnoremap <Leader>d "+d
nnoremap qd :action QuickJavaDoc<CR>
nnoremap qe :action ShowErrorDescription<CR>
nnoremap <BackSpace> :nohl<CR>
nnoremap [<Space> O<Esc>j
nnoremap ]<Space> o<Esc>k
" nnoremap <Leader>gd <Esc>/def <CR>Nzz
" nnoremap <Leader>gc <Esc>/class <CR>Nzz
nnoremap <Leader>gf :action MethodDown<CR>
nnoremap <Leader>gF :action MethodUp<CR>
nnoremap <Leader>rw <Esc>"9yiw:s/<C-r>9//g<Left><Left>
nnoremap <Leader>rW <Esc>"9yiW:s/<C-r>9//g<Left><Left>
nnoremap <Leader>rvw <Esc>"9yiw:s/\v(<C-r>9)//g<Left><Left>
nnoremap <Leader>rvW <Esc>"9yiW:s/\v(<C-r>9)//g<Left><Left>
nnoremap <Leader>Rw <Esc>"9yiw:%s/<C-r>9//gc<Left><Left><Left>
nnoremap <Leader>RW <Esc>"9yiW:%s/<C-r>9//gc<Left><Left><Left>
nnoremap <Leader>Rvw <Esc>"9yiw:%s/\v(<C-r>9)//gc<Left><Left><Left>
nnoremap <Leader>RvW <Esc>"9yiW:%s/\v(<C-r>9)//gc<Left><Left><Left>
nnoremap <Leader>rp <Esc>ciw<C-r>0<Esc>
" nnoremap <Ctrl><Enter> o<Esc>j
" nnoremap c/ :action CommentByLineComment<CR>

"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)

"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)

vnoremap <Leader>y "+y
vnoremap <Leader>p "+p
vnoremap <Leader>d "+d

inoremap <C-v> <C-r>+
inoremap <C-z> <C-o>u
inoremap <C-S-z> <C-o><C-R>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值