aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorTeddy Wing2018-04-06 00:44:20 +0200
committerTeddy Wing2018-04-06 00:44:20 +0200
commit920a45031e322d81827f2102ec5847f7479305ad (patch)
treecf7baff333b5b3720b3c244c28dad337cfaeeac0 /vimrc
parentaee838fefd2dd878915e14de0380731482b08e6d (diff)
downloaddotvim-920a45031e322d81827f2102ec5847f7479305ad.tar.bz2
vimrc: Add `z<C-]>` mapping
For jumping to a tag, `<C-]>` is great, but I usually like to have the current buffer stay open and look at the tag source in a different window. This new mapping gives me a quick way to do that.
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc6
1 files changed, 6 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 473852f..1c43095 100644
--- a/vimrc
+++ b/vimrc
@@ -397,6 +397,9 @@
" 2018.02.10:
" * Add <leader>w to search the word under the cursor with Ripgrep.
"
+" 2018.04.05:
+" * Add z<C-]> to jump to tag in a vertical split.
+"
" Pathogen
@@ -712,6 +715,9 @@ nnoremap [q :cprevious<cr>
" Set scrollbind on a window
nnoremap <leader>sb :setlocal scrollbind! scrollbind?<cr>
+" Jump to tag in a new split
+nnoremap z<C-]> :execute ':vertical stjump ' . expand('<cword>')<cr>
+
" Copy to OS X clipboard from visual mode
" http://stackoverflow.com/a/17126375
vnoremap <leader>c !tee >(pbcopy)<cr>