Created
May 9, 2011 11:55
-
-
Save TaurusOlson/962401 to your computer and use it in GitHub Desktop.
An alternative vimgrep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! VG(pattern) | |
silent exe "vimgrep /" . a:pattern . "/ %" | |
silent exe "copen" | |
silent exe "setlocal cul" | |
endfunction | |
function! VGAdd(pattern) | |
silent exe "vimgrepadd /" . a:pattern . "/ %" | |
silent exe "copen" | |
silent exe "setlocal cul" | |
endfunction | |
command! -nargs=+ VG :call VG(<q-args>) | |
map <leader>g :VG | |
command! -nargs=+ VGAdd :call VGAdd(<q-args>) | |
map <leader>a :VGAdd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment