:new and :tag

10 views
Skip to first unread message

Eli the Bearded

unread,
Aug 26, 2019, 4:17:24 PM8/26/19
to vim...@googlegroups.com
I find myself often wanting to open a new buffer and then lookup a tag.
In visual mode, I can use <ctrl-w><ctrl-]> while on top of a tag word.
In ex (command line) I have been using:

:cmap ,nt new\|tag

and then typing ":,nt" which expands before my eyes to ":new|tag". But I
keep feeling like that's a feature that would be there as some built-in
command I can't find. Is it?

Elijah
------
has been weighing merits of :cab versus :cmap that

Yegappan Lakshmanan

unread,
Aug 26, 2019, 4:32:32 PM8/26/19
to vim...@googlegroups.com
Hi,

On Mon, Aug 26, 2019 at 1:17 PM Eli the Bearded <v...@eli.users.panix.com> wrote:
>
> I find myself often wanting to open a new buffer and then lookup a tag.
> In visual mode, I can use <ctrl-w><ctrl-]> while on top of a tag word.
> In ex (command line) I have been using:
>
> :cmap ,nt new\|tag
>
> and then typing ":,nt" which expands before my eyes to ":new|tag". But I
> keep feeling like that's a feature that would be there as some built-in
> command I can't find. Is it?
>

Did you try using the ":stag" command? This command splits the window and
then jumps to the specified tag.

- Yegappan

Eli the Bearded

unread,
Aug 26, 2019, 4:39:53 PM8/26/19
to vim...@googlegroups.com
Yegappan Lakshmanan <yega...@gmail.com> wrote:
> Did you try using the ":stag" command? This command splits the window and
> then jumps to the specified tag.

No, I had not. And that looks to be the command I was overlooking.
Thanks.

Elijah
Reply all
Reply to author
Forward
0 new messages