Ⅰ. 插件描述
Utility script to autonumber lines while editingⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/autonumbering-in-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/autonumbering-in-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/autonumbering-in-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/autonumbering-in-vim
Ⅳ. 文档说明
"Description: This script auto-numbers a list.
"
"General recommended settings for editing "*.txt" files
"set nocp et ts=4 sw=4 tw=80 ai
"
"HOW TO INSTALL (requires vim 7.0):
" - Drop the plugin under $HOME/.vim/plugin or
" - :source autonum.vim
"
"HOW TO USE:
" 1. Edit a file and type as to activate autonumbering
" 2. Insert a number in the below-explained manner (1. )
" 3. Hit enter (A number is automatically inserted for you)
" 4. Hit ctrl-t, line is indented and numbered
" 5. If there are several levels of numbers, ctrl-d and ctrl-t could
" be used to insert the next number in sequence at the indent level
" your cursor is in.
" 6. Hit ctrl-g to remove the inserted number
" 7. Hit ctrl-l to forcefully autonumber
"
"Number format expected: "<(d+|a)>W "
" In words: <word-boundary><(numerals or alphabets)><non-word-char><space>
" eg: "1. ", "32) ", "a] ", "D> "
"
" keymappings: ENTER, ctrl-d, ctrl-t, ctlr-l & ctrl-g all in insert mode
" as : To start AutoNumbering
" as : To stop AutoNumbering (yeah, it toggles :)
" ENTER : start with next number (add 1 to previous)
" ctrl-d: indent one level back and try to autonumber
" ctrl-t: indent one level forward and try to autonumber
" ctrl-l: autonumber.
" ctrl-g: remove numbering on the line