" Source your .vimrc
"source ~/.vimrc

"" -- 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

" Do incremental searching.
set incsearch

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

set easymotion
set surround

let mapleader = "\<Space>"
""map <Leader> <Plug>(easymotion-s2)
map ss <Plug>(easymotion-s2)
inoremap jk <Esc>
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)

"" 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)


" Find more examples here: https://jb.gg/share-ideavimrc

" unimpaired mappings - from https://github.com/saaguero/ideavimrc/blob/master/.ideavimrc
nnoremap [<space> O<esc>j
nnoremap ]<space> o<esc>k
nnoremap [q :action PreviousOccurence<cr>
nnoremap ]q :action NextOccurence<cr>
nnoremap [m :action MethodUp<cr>
nnoremap ]m :action MethodDown<cr>
nnoremap [c :action VcsShowPrevChangeMarker<cr>
nnoremap ]c :action VcsShowNextChangeMarker<cr>
" Tabs
nnoremap [b :action PreviousTab<cr>
nnoremap ]b :action NextTab<cr>

" Search
nmap <leader>/ :action Find<cr>
nmap <leader>\ :action FindInPath<cr>

" Moving lines
nmap [e :action MoveLineUp<cr>
nmap ]e :action MoveLineDown<cr>
" Moving statements
nmap [s :action MoveStatementUp<cr>
nmap ]s :action MoveStatementDown<cr>


"Map common used global vim letter bookmarks to Intellij number bookmarks
nnoremap mM :action ToggleBookmark0<CR>
nnoremap mN :action ToggleBookmark1<CR>
nnoremap mJ :action ToggleBookmark2<CR>
nnoremap mK :action ToggleBookmark3<CR>
nnoremap mH :action ToggleBookmark4<CR>
nnoremap mL :action ToggleBookmark5<CR>
nnoremap mY :action ToggleBookmark6<CR>
nnoremap mI :action ToggleBookmark7<CR>
nnoremap mA :action ToggleBookmark8<CR>
nnoremap mB :action ToggleBookmark9<CR>

nnoremap 'M :action GotoBookmark0<CR>
nnoremap 'N :action GotoBookmark1<CR>
nnoremap 'J :action GotoBookmark2<CR>
nnoremap 'K :action GotoBookmark3<CR>
nnoremap 'H :action GotoBookmark4<CR>
nnoremap 'L :action GotoBookmark5<CR>
nnoremap 'Y :action GotoBookmark6<CR>
nnoremap 'I :action GotoBookmark7<CR>
nnoremap 'A :action GotoBookmark8<CR>
nnoremap 'B :action GotoBookmark9<CR>

"Use Intellij letter bookmarks comes with an annoying popup window.
文档更新时间: 2024-07-09 01:44   作者:suglow