Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does anyone know if it's possible (or know of an existing vim script or plugin) that can create a "status bar" that shows the name of the current class and method (or function) I'm editing?

I'm imagining that it would plug into the syntax parser for the filetype of the current buffer, and display a breadcrumb trail to show you what you're currently editing. I don't know vimscript well enough to suggest any more than that, but if there aren't any good solutions already, I may begin to hack on one, so suggestions as to where to start are welcome, too!

share|improve this question
add comment

1 Answer

This script puts the name of the current function in the title bar and/or the status line. It uses ctags to generate a list of tags for the current file and assumes that the tag preceding the cursor location is the name of the current function. Since it uses ctags, it can be customized to work with different languages, even structured text files. It works well in practice, but has some limitations. If nothing else, it might give you a starting point for hacking.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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