启用vim-airline附带的扩展程序

时间:2022-10-05 17:19:59

After I installed vim-airline, I found that there are a variety of plugins in the path

安装vim-airline后,我发现路径中有各种各样的插件

vim-airline\autoload\airline\extensions

VIM航空公司\自动加载\航空\扩展

but only a part of them are loaded every time I start Vim.

但每次启动Vim时,只会加载其中的一部分。

How can I enable extensions such as syntastic, tagbar, unite, ctrlp and so on?

如何启用诸如syntastic,tagbar,unite,ctrlp等扩展?

A possible way is to copy the .vim file to 'plugins' folder that vim provides. However, I want a solution that airline provides so that I don't have to manipulate files and can just configure them by a few commands.

一种可能的方法是将.vim文件复制到vim提供的“plugins”文件夹中。但是,我想要一个航空公司提供的解决方案,以便我不必操纵文件,只需通过一些命令配置它们即可。

2 个解决方案

#1


0  

Here's what I have in my old vimrc, it still seems to work:

这是我在旧的vimrc中的内容,它似乎仍然有效:

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

"" Whitespace Machine
"  enable/disable detection of whitespace errors.
let g:airline#extensions#whitespace#enabled = 1

I'd imagine you can enable other extensions with the same syntax.

我想你可以使用相同的语法启用其他扩展。

(If you like a more fully-featured vim development enviroment -- check out Spacemacs.)

(如果你喜欢功能更全面的vim开发环境 - 请查看Spacemacs。)

#2


0  

I have been confused with how those extensions work for a few days.

我对这些扩展如何工作几天感到困惑。

It turns out that I have misunderstood what those extensions are.

事实证明,我误解了这些扩展是什么。

Extensions come with airline are not plugins themselves, but some additional features related to those plugins to be displayed in the statusline.

航空公司的扩展程序本身并不是插件,而是与状态行中显示的那些插件相关的一些附加功能。

That is to say, one has to install those plugins first before he enables those extensions. And after the installation of plugins, airline can work perfectly with them, providing cool style to display their status.

也就是说,必须先安装这些插件才能启用这些扩展。安装插件后,航空公司可以与他们完美配合,提供炫酷的风格来展示他们的状态。

#1


0  

Here's what I have in my old vimrc, it still seems to work:

这是我在旧的vimrc中的内容,它似乎仍然有效:

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

"" Whitespace Machine
"  enable/disable detection of whitespace errors.
let g:airline#extensions#whitespace#enabled = 1

I'd imagine you can enable other extensions with the same syntax.

我想你可以使用相同的语法启用其他扩展。

(If you like a more fully-featured vim development enviroment -- check out Spacemacs.)

(如果你喜欢功能更全面的vim开发环境 - 请查看Spacemacs。)

#2


0  

I have been confused with how those extensions work for a few days.

我对这些扩展如何工作几天感到困惑。

It turns out that I have misunderstood what those extensions are.

事实证明,我误解了这些扩展是什么。

Extensions come with airline are not plugins themselves, but some additional features related to those plugins to be displayed in the statusline.

航空公司的扩展程序本身并不是插件,而是与状态行中显示的那些插件相关的一些附加功能。

That is to say, one has to install those plugins first before he enables those extensions. And after the installation of plugins, airline can work perfectly with them, providing cool style to display their status.

也就是说,必须先安装这些插件才能启用这些扩展。安装插件后,航空公司可以与他们完美配合,提供炫酷的风格来展示他们的状态。