Ⅰ. 插件描述
SELinux Vim supportⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'lzap/vim-selinux'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'lzap/vim-selinux'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'lzap/vim-selinux'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/lzap/vim-selinux
Ⅳ. 文档说明
# SELinux Vim plugin
Helps SELinux policy maintainers to see through the m4 thing.
Upstream site.
What does it do?
- .te/.if syntax highlighting (based on m4 syntax)
- utility function to create ctags for your project (and system interfaces)
Installation
Recommended installation with vundle:
How to use
Bundle 'lzap/vim-selinux'Configuration
If you want to use ctags, make sure you have your SELinux development files
installed (the plugin expects them in /usr/share/selinux/devel/include/) and
map the SelinuxCtags function to some combination:
map <Leader>x :call SelinuxCtags()<CR>There is also a function called SelinuxCtagsSilent which has silenced output.
Tip - add tags file to global git ignore
Tired of adding tags file into individual .gitignore files for each project?
Do this:
git config --global core.excludesfile '~/.cvsignore'
echo tags >> ~/.cvsignore
Thanks Tim Pope for this tip.
Credits
This plugin is maintained by Lukas Zapletal.
Initial version of the .te syntax was written by Thomas Bleher.
Miroslav Grepl wrote the ctags regexps for SELinux support.
License
Vim license