Better key mappings for gitgrep which don't override standard behavior
This commit is contained in:
21
vimrc
21
vimrc
@@ -33,6 +33,9 @@ set noswapfile
|
|||||||
set nobackup
|
set nobackup
|
||||||
set nowb
|
set nowb
|
||||||
|
|
||||||
|
" Disable cursor blink
|
||||||
|
set gcr=a:blinkon0
|
||||||
|
|
||||||
" persistent undos - undo after you re-open the file
|
" persistent undos - undo after you re-open the file
|
||||||
" but this gives warnings under command line vim
|
" but this gives warnings under command line vim
|
||||||
" use only in macvim
|
" use only in macvim
|
||||||
@@ -228,9 +231,8 @@ nnoremap <silent> Z <C-^>
|
|||||||
nnoremap <silent> K :GitGrep <cword><CR>
|
nnoremap <silent> K :GitGrep <cword><CR>
|
||||||
|
|
||||||
"open up a git grep line, with a quote started for the search
|
"open up a git grep line, with a quote started for the search
|
||||||
"mnemonic: the letter O looks like a magnifying glass or goggles (search)
|
nnoremap ,gg :GitGrep "
|
||||||
nnoremap O :GitGrep "
|
nnoremap ,gcp :GitGrepCurrentPartial<CR>
|
||||||
nnoremap <silent> P :GitGrepCurrentPartial<CR>
|
|
||||||
|
|
||||||
" create <%= foo %> erb tags using Ctrl-k in edit mode
|
" create <%= foo %> erb tags using Ctrl-k in edit mode
|
||||||
imap <silent> <C-K> <%= %><Esc>3hi
|
imap <silent> <C-K> <%= %><Esc>3hi
|
||||||
@@ -317,11 +319,10 @@ nnoremap W :w<CR>
|
|||||||
" RSI Prevention - keyboard remaps
|
" RSI Prevention - keyboard remaps
|
||||||
" ========================================
|
" ========================================
|
||||||
" in code, undescores and dashes are very commmon, but
|
" in code, undescores and dashes are very commmon, but
|
||||||
" the key is really far away. remap Apple-k to give us
|
" the key is really far away. remap the middle fingers
|
||||||
" underscores and Apple-Shift-K to give dashes.
|
" with the command key to do what we want (type dashes)
|
||||||
" home row for the win!
|
|
||||||
imap <silent> <D-k> _
|
imap <silent> <D-k> _
|
||||||
imap <silent> <D-K> -
|
imap <silent> <D-d> -
|
||||||
|
|
||||||
|
|
||||||
" fugitive.git
|
" fugitive.git
|
||||||
@@ -408,3 +409,9 @@ inoremap <expr><D-Space> pumvisible() ? "\<C-n>" : "\<TAB>"
|
|||||||
let g:CommandTMaxHeight = 5
|
let g:CommandTMaxHeight = 5
|
||||||
let g:CommandTMatchWindowReverse = 1
|
let g:CommandTMatchWindowReverse = 1
|
||||||
nmap ,t :CommandT<CR>
|
nmap ,t :CommandT<CR>
|
||||||
|
|
||||||
|
|
||||||
|
" Some color remaps
|
||||||
|
" If statements and def statements should look similar
|
||||||
|
" so you can see the flow
|
||||||
|
hi! link rubyDefine rubyControl
|
||||||
|
|||||||
Reference in New Issue
Block a user