Ⅰ. 插件描述
Vim plugin to automatically close environments in TeX/LaTeXⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'gi1242/tex-autoclose-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'gi1242/tex-autoclose-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'gi1242/tex-autoclose-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/gi1242/vim-tex-autoclose
Ⅳ. 文档说明
# tex_autoclose.vim
Provides mappings to automatically close environments in TeX/LaTeX.
Pressing \c in normal mode (or <C-\>c in insert mode) will cause the last open environment to be closed.
(If a fold is started on the \begin{env} line, then it will be automatically
closed on the \end{env} line.)
Also pressing <C-\>} in insert mode when the cursor is at the end of a \begin{environment} will automatically generate a \end{environment}.
It will leave the cursor at the end of the \begin{environment} (in insert mode), so that the user can enter arguments [if any].
Small and functional. Suggestions welcome.
Install details
Drop the script into your $VIMRUNTIME/ftplugin directory for global instalation.
Put it in ~/.vim/ftplugin for local installation.