dotfiles/.ideavimrc
2024-02-04 16:45:23 +01:00

59 lines
1.4 KiB
Plaintext

set rnu
set surround
set iskeyword+=$
set vb
set ignorecase smartcase
" Moving blocks of text in visual mode
vnoremap < <gv
vnoremap > >gv
" Select all text
map <leader>a ggVG
" reload
nnoremap <leader>vs :source ~/.ideavimrc<CR>
" Copy until the end of the line
noremap Y y$
" clipboard
noremap <leader>y "*y
noremap <leader>Y "*Y
noremap <leader>p "*p
noremap <leader>P "*P
" refactoring
nnoremap <leader>rf :action RenameFile<cr>
nnoremap <leader>rr :action RenameElement<cr>
nnoremap <leader>ll :action ReformatCode<cr>
" actions
nnoremap <leader>/ :action CommentByLineComment<cr>
nnoremap <leader>b :action ToggleLineBreakpoint<cr>
nnoremap <leader>oi :action OptimizeImports<CR>
nnoremap ee :action SearchEverywhere<cr>
nnoremap <leader>e :action ExpandSelection
nnoremap <leader><leader> :action SearchEverywhere<cr>
nnoremap <tab> :action Switcher<cr>
" gotos
nnoremap gi :action GotoImplementation<cr>
nnoremap gs :action GotoSuperMethod<cr>
nnoremap gu :action ShowUsages<cr>
" unimpaired mappings
nnoremap [<leader> O<esc>j
nnoremap ]<leader> 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>
set ideajoin
" autocations
nnoremap :w :action com.dubreuia.core.action.ShortcutAction<CR>:action SaveDocument