,q/ ,qg/ ,qa/ Quickfix search aliases inspired by Steve Losh
This commit is contained in:
parent
4a7df20fd1
commit
c205313b25
@ -195,6 +195,9 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
|
|||||||
* ,gg - GitGrep command line with a quote pretyped (close the quote yourself)
|
* ,gg - GitGrep command line with a quote pretyped (close the quote yourself)
|
||||||
* ,gcp - GitGrep Current Partial to find references to the current view partial
|
* ,gcp - GitGrep Current Partial to find references to the current view partial
|
||||||
* // - clear the search
|
* // - clear the search
|
||||||
|
* ,q/ - quickfix window with last search (stolen from Steve Losh)
|
||||||
|
* ,qa/ - quickfix Ack last search (Steve Losh)
|
||||||
|
* ,qg/ - quickfix GitGrep last search
|
||||||
* ,T - Tag list (list of methods in a class)
|
* ,T - Tag list (list of methods in a class)
|
||||||
|
|
||||||
**File Navigation**
|
**File Navigation**
|
||||||
@ -237,8 +240,8 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
|
|||||||
* vv - vertical split (Ctrl-w,v)
|
* vv - vertical split (Ctrl-w,v)
|
||||||
* ss - horizontal split (Ctrl-w,s)
|
* ss - horizontal split (Ctrl-w,s)
|
||||||
* ,, - zoom a window to max size and again to unzoom it (ZoomWin plugin, usually C-w,o)
|
* ,, - zoom a window to max size and again to unzoom it (ZoomWin plugin, usually C-w,o)
|
||||||
* ,oq - open quickfix window (this is where output from GitGrep goes)
|
* ,qo - open quickfix window (this is where output from GitGrep goes)
|
||||||
* ,q - close quickfix
|
* ,qc - close quickfix
|
||||||
|
|
||||||
**NERDTree Project Tree**
|
**NERDTree Project Tree**
|
||||||
|
|
||||||
|
9
vim/plugin/settings/quickfix-search.vim
Normal file
9
vim/plugin/settings/quickfix-search.vim
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
" Stolen from Steve Losh vimrc: https://bitbucket.org/sjl/dotfiles/src/tip/vim/.vimrc
|
||||||
|
" Open a Quickfix window for the last search.
|
||||||
|
nnoremap <silent> <leader>q/ :execute 'vimgrep /'.@/.'/g %'<CR>:copen<CR>
|
||||||
|
|
||||||
|
" Ack for the last search.
|
||||||
|
nnoremap <silent> <leader>qa/ :execute "Ack! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR>
|
||||||
|
|
||||||
|
" GitGrep the last search (my own invention)
|
||||||
|
nnoremap <silent> <leader>qg/ :execute "GitGrep '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR>
|
@ -14,7 +14,7 @@ nnoremap ,yw yiww
|
|||||||
|
|
||||||
" ,ow = 'overwrite word', replace a word with what's in the yank buffer
|
" ,ow = 'overwrite word', replace a word with what's in the yank buffer
|
||||||
" FIXME: will not properly repeat when you use a dot (tie into repeat.vim)
|
" FIXME: will not properly repeat when you use a dot (tie into repeat.vim)
|
||||||
nnoremap ,ow viwp
|
nnoremap ,ow "_diwhp
|
||||||
|
|
||||||
"make Y consistent with C and D
|
"make Y consistent with C and D
|
||||||
nnoremap Y y$
|
nnoremap Y y$
|
||||||
@ -59,8 +59,8 @@ nmap <D-N> :NERDTreeToggle<CR>
|
|||||||
|
|
||||||
" ,q to toggle quickfix window (where you have stuff like GitGrep)
|
" ,q to toggle quickfix window (where you have stuff like GitGrep)
|
||||||
" ,oq to open it back up (rare)
|
" ,oq to open it back up (rare)
|
||||||
nmap <silent> ,q :cclose<CR>
|
nmap <silent> ,qc :cclose<CR>
|
||||||
nmap <silent> ,oq :copen<CR>
|
nmap <silent> ,qo :copen<CR>
|
||||||
|
|
||||||
" move up/down quickly by using Ctrl-j, Ctrl-k
|
" move up/down quickly by using Ctrl-j, Ctrl-k
|
||||||
" which will move us around by functions
|
" which will move us around by functions
|
||||||
|
Loading…
Reference in New Issue
Block a user