Skip to content

Instantly share code, notes, and snippets.

@LukeMathWalker
Last active August 26, 2022 23:04
Show Gist options
  • Save LukeMathWalker/f145b162f948c53239d1ece410aae0da to your computer and use it in GitHub Desktop.
Save LukeMathWalker/f145b162f948c53239d1ece410aae0da to your computer and use it in GitHub Desktop.
Plug 'easymotion/vim-easymotion'
let mapleader=" "
set easymotion
nmap <space><space>s :action KJumpAction<cr>
nmap <space><space>w :action KJumpAction.Word0<cr>
nmap <space><space>l :action KJumpAction.Line<cr>
set hlsearch
set scrolloff=3
set ignorecase smartcase
set showmode
set history=1000
" easy system clipboard copy/paste
noremap <space>y "*y
noremap <space>Y "*Y
noremap <space>p "*p
noremap <space>P "*P
" easy window navigation
nnoremap <c-l> <c-w>l
nnoremap <c-h> <c-w>h
nnoremap <a-h> gT
nnoremap <a-l> gt
nnoremap <c-s-tab> gT
nnoremap <c-tab> gt
" actions
nnoremap <space>q :action CloseContent<cr>
nnoremap <space>Q :action ReopenClosedTab<cr>
nnoremap <space>\ :action VimFilePrevious<cr>
nnoremap <space>e :action SearchEverywhere<cr>
nnoremap <space>E :action Switcher<cr>
nnoremap <space>t :action FileStructurePopup<cr>
nnoremap <space>T :action GotoSymbol<cr>
nnoremap <space>a :action GotoAction<cr>
nnoremap <space>b :action ToggleLineBreakpoint<cr>
nnoremap <space>k :action Vcs.CheckinProjectPopup<cr>
" code navigation
nnoremap <space>] :action GotoImplementation<cr>
nnoremap <space>[ :action GotoSuperMethod<cr>
nnoremap <space>u :action FindUsages<cr>
nnoremap <space>gt :action GotoTest<cr>
nnoremap <space>k :action HighlightUsagesInFile<cr>
nnoremap \r :action RunClass<cr>
nnoremap \R :action Run<cr>
nnoremap \d :action DebugClass<cr>
nnoremap \D :action Debug<cr>
nnoremap \c :action CheckStyleCurrentFileAction<cr>
" code refactoring
nnoremap <space>rr :action RenameElement<cr>
" built-in navigation to navigated items works better
nnoremap <c-o> :action Back<cr>
nnoremap <c-i> :action Forward<cr>
" but preserve ideavim defaults
nnoremap g<c-o> <c-o>
nnoremap g<c-i> <c-i>
" built in search looks better
nnoremap / :action Find<cr>
" but preserve ideavim search
nnoremap g/ /
" disable annoying bell sound
set visualbell
set noerrorbells
" modify default navigation to be snake-case/CamelCase aware
map w [w
map e ]w
map b [b
@talis0man
Copy link

Hello 👋 I found your .ideavimrc file because I am learning vim extension in WebStorm.
I'm trying to set up CamelCase navigation. It's simple, as in your lines 73-76.
Have you tried configuring CamelCase actions: dw, de, db, cw, ce, cb? Delete part of a word, replace part of a word. I can't get it to work. 🙁🙏 I hope for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment