Zarko Coklin wrote:
And Tony does it again ;-)

Thanks Tony!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Zarko Coklin wrote:
Is it possible to have a setup in .vimrc so that
every
time I select tag either through "CTRL-]" or by
holding CTRL and pressing left mouse click to open a
new buffer in a new tab?

Regards,
Zarko Coklin

        :map <C-]>          :exe "tab stag"
expand("<cword>")<CR>
        :map <C-LeftMouse>  :exe "tab stag"
expand("<cword>")<CR>

See
        :help :tab
        :help :stag
        :help <cword>

Note:
        :tab wincmd ]<CR>
ought to work but doesn't.



Best regards,
Tony.

Starting with patchlevel 7.0.216, ":tab wincmd ]" now opens the definition of the tag under the cursor in a new tab. The "table of contents" of the patches (with a one-line description of each) is available at (for Vim 7.0) http://ftp.vim.org/pub/vim/patches/7.0/README

For a mapping in the vimrc, ':exe "tab stag" expand("<cword>")' (without the single quotes) might be safer, since it also works with earlier patchlevels of Vim 7.


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
105. When someone asks you for your address, you tell them your URL.

Reply via email to