summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReiner Herrmann <reiner@reiner-h.de>2016-12-29 16:21:23 +0100
committerReiner Herrmann <reiner@reiner-h.de>2016-12-29 16:21:26 +0100
commit8ef1ba06bfcbd38d552a88de4069560254270bac (patch)
tree674c0fd6765c68740d75b89aae40cc67dd8fff83
parent1c9a39a0741fa851b6248bf587839cb1bddc9395 (diff)
vimrc: define convenience wrapper function for grep
Plain :grep keeps output open and waits for confirmation before returning to vim, doesn't show the quicklist and jumps to the first result.
-rw-r--r--vimrc2
1 files changed, 2 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 658bdf4..af11d10 100644
--- a/vimrc
+++ b/vimrc
@@ -94,6 +94,8 @@ noremap <Right> <Nop>
nmap <ESC>[5^ <C-PageUp>
nmap <ESC>[6^ <C-PageDown>
+" more convenient grepping
+command -nargs=+ Grep execute 'silent grep! <args>' | execute 'redraw!' | execute 'copen'
" folding settings; disabled for now because of performance problems
"set foldmethod=syntax " fold automatically by syntax rules