Przeglądaj źródła

make sure global quickfix shortcuts are set for Glog

Weiyi Lou 13 lat temu
rodzic
commit
360c631ddc
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      vim/vimrc

+ 3 - 2
vim/vimrc

@@ -70,7 +70,7 @@ if has("autocmd")
   autocmd FileType qf nnoremap <silent> <buffer> go <CR><C-W><C-W>
 
   " Global remaps when QuickFix buffer is opened
-  autocmd BufWinEnter QuickFix
+  autocmd BufWinEnter quickfix
         \ let g:qfix_win = bufnr("$") |
         \ call MapQfPrevNext()
   autocmd BufWinLeave *
@@ -80,7 +80,7 @@ if has("autocmd")
         \ endif
 
   " Open QuickFix window after any grep invocation (Glog and Ggrep)
-  autocmd QuickFixCmdPost *grep* cwindow
+  autocmd QuickFixCmdPost *grep* cwindow | call MapQfPrevNext()
 
   " if the last window is NERDTree, then close Vim
   "autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
@@ -220,6 +220,7 @@ nmap <silent> <leader>u    :GundoToggle<CR>
 
 " Git blame with Fugitive!
 nmap <silent> <leader>b    :Gblame<CR>
+nmap <silent> <leader>g    :Glog<CR><CR>
 
 " Code heirarchy with Tagbar!
 nmap <silent> <leader>t    :TagbarToggle<CR>