On 2022-08-11, Brandon Richardson wrote:
> Hello all,
> 
> I've been prototyping some alternative commands to :tselect and :tjump and I'm
> looking to get a bit of feedback from the community on whether this
> functionality is something worth introducing into the core project. This
> functionality originally started it's life as small plugin in my dotfiles and
> I've grown to really enjoy the experience it provides. I figured that the
> community could benefit, so I've been working to implement it as a core 
> feature
> in vim.
> 
> When there are multiple tag matches for a particular keyword, :tag and CTRL-]
> both jump to the first match by default. Alternatively, :tselect and :tjump 
> can
> be used to select which match to jump to by showing a message and prompting 
> for
> input.
> 
> I'd like to propose two new commands, :pwtselect and :pwtjump and perhaps a 
> new
> key mapping that displays the tag matches in a popup window at the cursor
> position. The user may then select which tag to jump to. It would look and 
> feel
> very similar to the completion popup features, and it leverages much of the
> existing foundation for :tselect and friends.
> 
> Each entry in the popup window could have the format "[<kind>] <tagname>
> <fname>". We could also include "info" fields and the the line from the file
> (massaged from the "cmd" field like in the current implementation of :tselect
> and friends).
> 
> If this is something the community deems worth pursuing, I'll continue 
> pressing
> forward on my patch series. I'd love to hear people's thoughts and opinions.

There is a plugin that implements some of what you are proposing,
tagselect.vim, "Provides a better :tselect command," by Hari
Krishna Dara.  It was last updated on June 9, 2005.

    https://www.vim.org/scripts/script.php?script_id=1282

It provides the same display of tag information as :tselect and
related commands do, but in an easier-to-use menu.  I have Ctrl-]
mapped to the :Tjump command.

It could use some updating.  I think what you propose is a good
idea.  I'm not sure that it needs to be incorporated into Vim if it
works well as a plugin.  That is, if it's not missing some
functionality or performance that it would have if made part of Vim,
then it's probably better to leave it as a plugin.  For one thing,
a plugin is easier to modify, so it is a better medium for proposing
new functionality than changes to core Vim.

If the functionality was to be added to Vim, I don't think there is
a need for more commands.  I think users will prefer either your
interface or the original, but will probably not switch between the
two.  Therefore, I would propose an option that let the user choose
between interfaces, perhaps with choices of legacy, Hari's style
with the menu in a split window, and your style with the menu in
a pop-up window.

On the other hand, having an option that changes the behavior of an
existing command could break plugins that use :tselect and related
commands.  So maybe it would be better to have new functions that
the user can map, although that's not as convenient.

My rambling $0.02.

Regards,
Gary

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220812042701.GM12539%40phoenix.

Raspunde prin e-mail lui