Ⅰ. 插件描述
A simple ftplugin for `.prototxt` files.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'chiphogg/vim-prototxt'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'chiphogg/vim-prototxt'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'chiphogg/vim-prototxt'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/chiphogg/vim-prototxt
Ⅳ. 文档说明
# vim-prototxt
A filetype plugin for .prototxt files.
The main use case is caffe models, which use this format. Right now, this plugin only provides naive bare-bones syntax highlighting. However, even this small change dramatically improves readability.
It would be great to provide more caffe-specific highlighting. For example, if we could highlight all the caffe keywords, it would be easier to spot spelling errors for field names. However, I have no idea how to reliably detect that a file is for caffe (as opposed to some other kind of .prototxt file), so I'm sticking with this very simple "80% solution" for now.
Installation
With Pathogen
cd ~/.vim/bundle
git clone git://github.com/chiphogg/vim-prototxt.git
With Vundle
" .vimrc
Plugin 'chiphogg/vim-prototxt'
--
Note: Since vim-prototxt uses filetype detection, when installing with vundle it is important to have the right ordering of commands in your .vimrc (explained in detail here) to ensure ftdetect functions correctly. The required ordering is:
filetype off
...
call vundle#Begin()
...other plugins...
Plugin 'chiphogg/vim-prototxt'
call vundle#end()
...
" turn on filetype-specific indentation (must be called after Vundle)
filetype plugin indent on
License
Copyright (c) Chip Hogg. Distributed under the same terms as Vim itself. See :help license.