Vim: viewing file structure - classes, methods, functions

TagBar is similar to the aforementioned TagList, in a different way, but it's not that good with PHP.

This very new plugin claims to fix the issue. I've never tested it, though.


This is reminiscent of ack and Ack.vim regarding jumping to functions amongst many files. There's also FuzzyFinder or command-t or NERDTree for file browsing and Taglist for source code browsing. You can also use :help foldmethod to fold all the functions and see them in a "tree-like" fashion that's expandable. Get familiar with gf and * or # to jump around between files and variables.


I use :set foldmethod=syntax. zM to fold everything up; zx to open the fold under the cursor and close other open folds. The taglist plugin (as already mentioned) will do more, but folds are a quick win.


Taglist allows you to do this for open buffers.


While it won't fulfill all your dreams of a world of wizardry filled with fancy buttons on which your eyes can feast on endless trees of source code... phpfolding.vim does a wonderful per file job of automatically folding all functions with a quick F5 (and is still updated after 12+ years)

vimfolding screenshot