Reputation: 28222
I love the sorts of features that applications like textedit and sublime edit have, where you can see the current namespace in a little bar in the UI. Is there any way to make vim do that?
Upvotes: 2
Views: 920
Reputation: 4948
here's a one-liner you can put in your .vimrc (need to have taglist.vim installed though):
set statusline=%<%f\ [%{Tlist_Get_Tagname_By_Line()}]\ %h%m%r%=%-14.(%l,%c%V%)\ %P
...that'll show the current function your cursor is in as you move around.
I forget the specifics but sometimes you'll want to manually refresh it, in which case this mapping is useful:
map <F4> :TlistUpdate<CR>:TlistHighlightTag<CR>
^ that'll refresh the function name in your statusline when you press F4
Upvotes: 0
Reputation: 196466
Would TagBar or TagList help? Both provide a small function to add to your statusline to that effect. Or maybe this other plugin?
I'm not fan of that kind of feature. I prefer to use <C-w>}
when I need.
Upvotes: 0