Ⅰ. 插件描述
Generates a LaTeX problem set templateⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ajzafar/vim-pset'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ajzafar/vim-pset'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ajzafar/vim-pset'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ajzafar/vim-pset
Ⅳ. 文档说明
# vim-pset #
Overview
This is a short Vim plug-in to generate a LaTeX template like the following,
given a set of numbers representing the problems you need to do.
\begin{probset}
\prob{26}
\prob{28}
% ...
\end{pset}
Usage
Generating the template is done with the :Pset Vim command that takes a space
separated list, for example :Pset 26 28 30 40 44.
I use the following environment.
\newenvironment{probset}%
{\begin{enumerate}
\newcommand*{\prob}[1]{\setcounter{enumi}{##1-1}\item}}%
{\end{enumerate}}
Settings
There are three settings available: pset_begin, pset_end, andpset_problem. They define what is put at the beginning, the end, and for each
- The
pset_problemvariable must contain an\rsomewhere, as this is - with the problem number. Both global and buffer local variables are
checked.
Future
In the future, this plug-in will be customizable (indentation, separation, and
names). I had one or two other ideas, but I forgot them.