How can I display the function name in vim-airline?
Asked Answered
C

1

9

I'm using the ctags vim plugin to have the name of the current C function (=where the cursor is) displayed in the status line.

Today I installed the vim-airline plugin. Fancy, but the C function name is no longer displayed in the status line. There is lots of room for more text. Is there a way to make ctags.vim and airline coexist or some other technique to show the function name somewhere in the status line like ctags does?

I searched the :help airline for function but that did not answer my question.

Chalybite answered 6/11, 2014 at 21:11 Comment(1)
You should try airline isssue tracker.Slobbery
M
12

I don't know about ctags.vim but vim-airline has support for tagbar which is great. You only need to install it (majutsushi/tagbar) and then enable it in your .vimrc so airline can show you in which function you are on:

let g:airline#extensions#tagbar#enabled = 1

Of course, in addition to that, you get all the cool functionality of tagbar.

Morality answered 8/11, 2014 at 0:3 Comment(1)
Thanks!! I spent a while trying to get this to work before finally launching tagbar to saw that I'd broken tagbar with a bad path for ctags. Once I had tagbar working, the function name showed up in airline. Yes, very similar in behavior to ctags.vim.Nauplius

© 2022 - 2024 — McMap. All rights reserved.