2

I am using exuberent-ctags with vim 8.0. While searching for a tag with a long name, I'd like to have a list of suggestions having the typed string as the sub-string when I use the :ta command. What I want is to have a feature like Sublime's Ctrl+P, that allows you to search for a symbol. Is it possible to achieve the same with ctags?

  • 1
    You can use tab completion on the :ta command, but it's not great... It gets a bit better if you :set wildmenu, possibly together with :set wildmode=full. I think one of the plug-ins (like CtrlP or perhaps fzf) might implement completion for tags that might be much more powerful, maybe check them out. – filbranden Sep 1 '19 at 4:40
1

You can use Ctrl+D in command-line mode, it shows you all the suggestions you would get with the Tab completion. e.g. :ta func<C-D>

Apart from that, fzf plugin have a :Tags and CtrlP have :CtrlPTag that allows fuzzy-searching for tags. But if you don't use their other features, it might be better to keep it simple with CTRL+D if it works for you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.