aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-10-03 11:12:38 +0800
committerAaron LI <aly@aaronly.me>2019-10-03 11:12:38 +0800
commite7bd221bc58a4437d9c0ab5f31193e68cd3e01db (patch)
tree3d4b0c97a99ca19c4957b1337e20bdb47f200b74
parent3c3b6e708a9d723380e825939bbfe9a8235e5bb0 (diff)
downloaddotfiles-e7bd221bc58a4437d9c0ab5f31193e68cd3e01db.tar.bz2
vim: Add <leader>* key map
-rw-r--r--_vim/vimrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/_vim/vimrc b/_vim/vimrc
index cef50c2..a03d3a6 100644
--- a/_vim/vimrc
+++ b/_vim/vimrc
@@ -300,6 +300,9 @@ inoremap <F1> <Esc>
vnoremap <leader>y "+y
noremap <leader>p "+p
+" Grep the word under cursor
+nnoremap <leader>* :grep! "\b<C-r><C-w>\b"<cr>:cw<cr>
+
" Use the Silver Searcher
if executable("ag")
set grepprg=ag\ --nogroup\ --nocolor