8

While working in various source files, (C, Ruby, etc.) I find that I'm often hunting around for functions. Is there a way to have an auto-generated HUD that lists the structure of the current file? It would be fantastic if it linked to different parts of the file, similar to how NERDTree links to different files. Or, similar to the side-navs in the screenshots here: https://stackoverflow.com/questions/16895610/gen-file-missing-incomplete-in-eclipse

Assuming that this doesn't exist as a plugin or something, how do people usually navigate around files like this?

8

You could try either TagList or TagBar but such a list could be generated as needed (no third party tool or configuration needed) with a simple:

:g/func/#

See :help :global.

If you don't mind a little bit of per-filetype configuration, the :dlist command could be used to list every function in the current file and included files:

:dlist /

See :help definition-search, :help 'include', :help 'define', :help 'suffixesadd'.

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.