Remap K to ,k for search so you don't accidentally lock up vim
People were complaining that "K" was too easy to hit by accident on a random char and search a large codebase.
This commit is contained in:
@@ -10,11 +10,11 @@ function! GetVisual()
|
||||
return selection
|
||||
endfunction
|
||||
|
||||
"grep the current word using K (mnemonic Kurrent)
|
||||
nnoremap <silent> K :Ag <cword><CR>
|
||||
"grep the current word using ,k (mnemonic Kurrent)
|
||||
nnoremap <silent> ,k :Ag <cword><CR>
|
||||
|
||||
"grep visual selection
|
||||
vnoremap K :<C-U>execute "Ag " . GetVisual()<CR>
|
||||
vnoremap ,k :<C-U>execute "Ag " . GetVisual()<CR>
|
||||
|
||||
"grep current word up to the next exclamation point using ,K
|
||||
nnoremap ,K viwf!:<C-U>execute "Ag " . GetVisual()<CR>
|
||||
|
||||
Reference in New Issue
Block a user