nlist.vim


Ⅰ. 插件描述

Vim global plugin for adding line numbers

Ⅱ. 基本信息

创建日期:  2001-10-01
使用用户:  1
Github星:  1
插件作者:  brian medley

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/nlist-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/nlist-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/nlist-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/nlist.vim

Ⅳ. 文档说明

Description:This provides a command and a function.  They both can be called with orwithout a range.  In addition, they can be called with or without arguments.Without a range they operate on the current line.  The arguments are describedbelow:    arg1 -> the number to start at.  The default is one.  This will            number your selected lines sequentially.  The start can be a            number, ., $, or, 'x (like getline).    arg2 -> Text to append after numbers.  The default is a space.    arg3 -> Controls formatting.  Can be "left", "right", or "none".  The            default is "right".Examples:    To make a list start at 1:        :'<,'>Nlist        :'<,'>call Nlist()    To number the whole buffer (with it's actual line number):        :%Nlist        :%call Nlist()    To number a subset of lines with their line number (and put a '] ' in    front of every number):        :'<,'>Nlist . ]        :'<,'>call Nlist(".", "] ")    To number the whole buffer (with it's actual line number) without    justification:        :%Nlist 1 left        :%call Nlist("1", " ", "none")Example mappings that a user can define:nnoremap <unique> <Leader>N :%Nlist<cr>vnoremap <unique> <Leader>N :Nlist<cr>

添加新评论