Created
August 2, 2018 16:04
-
-
Save d4em0n/f5900d8fe329d8ea30aa28c12c8d4457 to your computer and use it in GitHub Desktop.
Jump to tag function/definition into existing tab.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command SelectTag call SelectTag() | |
nnoremap <silent> <leader>p :SelectTag<CR> | |
function SelectTag() | |
let tagident = expand("<cword>") | |
let curname = expand('%:p') | |
exe "stjump ".tagident | |
let newname = expand('%:p') | |
if curname != newname | |
exe "norm q" | |
exe "tab drop ".newname | |
exe "tag ".tagident | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment