如何在vim-airline中显示函数名称? [英] How can I display the function name in vim-airline?

查看:381
本文介绍了如何在vim-airline中显示函数名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ctags vim插件在状态行中显示当前C函数的名称(=光标所在的位置).

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.

今天,我安装了vim-airline插件.花式,但C函数名称不再显示在状态行中.有更多的空间可以容纳更多文本.有没有办法使ctags.vimairline共存,或者有其他方法可以像ctags一样在状态行中显示函数名称?

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?

我在:help airline中搜索了function,但这没有回答我的问题.

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

推荐答案

我不了解ctags.vim,但是vim-airline支持tagbar,这很棒.您只需要安装它( majutsushi/tagbar ),然后在您的.vimrc中启用它,以便航空公司可以向您显示您使用的功能:

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

当然,除此之外,您还可以获得tagbar的所有出色功能.

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

这篇关于如何在vim-airline中显示函数名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆