Commit 492d38cc authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add vim async-grep keyed to "S"

parent 30d77b9e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -43,3 +43,6 @@
[submodule ".vim/bundle/vim-pathogen"]
	path = .vim/bundle/pathogen
	url = https://github.com/tpope/vim-pathogen.git
[submodule ".vim/bundle/asyncrun"]
	path = .vim/bundle/asyncrun
	url = https://github.com/skywind3000/asyncrun.vim.git
Original line number Diff line number Diff line
Subproject commit b3ed1c06587a634ca5cab9e0bc9620fe200778e0
+11 −4
Original line number Diff line number Diff line
@@ -148,18 +148,25 @@ endif
nmap <silent>th :set hlsearch!<CR>



" === GREPPING ===
noremap S :grep! '\b<cword>\b'<CR>:cw<CR>
vnoremap S ""y:grep! '<C-R>"'<CR>:cw<CR>

noremap S :AsyncRun -program=grep '\b<cword>\b'<CR>
vnoremap S ""y:AsyncRun -program=grep '\b<C-R>"\b'<CR>
let s:grepargs='-n --binary-files=without-match'
if executable("list-files")
	let &grepprg = 'list-files -z\|xargs -r0 grep ' . s:grepargs
	let &grepprg = 'list-files -z | xargs -r0 grep ' . s:grepargs
else
	let &grepprg = '~/.shell/bin/grep-auto-exclude grep $* -r . ' . s:grepargs
endif


" === AUTO QUICKFIX ===

augroup vimrc
	autocmd QuickFixCmdPost * botright copen 8
augroup END


" === MISC COMMANDS ===

" A homemade command to copy the unamed register up to tmux's buffers