togglenumber


Ⅰ. 插件描述

easy toggle between different number modes in vim

Ⅱ. 基本信息

创建日期:  2015-05-31
使用用户:  3
Github星:  3
插件作者:  Khoa Le

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

vim-togglenumber

Codacy Badge
Build Status
License

Easy toggle between different number modes in vim: nonumber, absolute and relative number,
with just one key sequence to rule it all. Most other plugins don't provide a seamless way
to do all 3 modes at once.

http://www.vim.org/scripts/script.php?script_id=5249

Installation

If you use pathogen, clone the repo as below:

git clone https://github.com/tkhoa2711/vim-togglenumber.git ~/.vim/bundle/vim-togglenumber

After having your help tags regenerated, you can view the reference manual with `:help
togglenumber`.

Or the Vundle way: add the following line to your .vimrc,
save it and then run :PluginInstall.

Plugin 'tkhoa2711/vim-togglenumber'

Usage

By default, the plugin is triggered with <Leader>n. However you can add your own
preferred mapping such as:

nnoremap <F6> :ToggleNumber<CR>

The standard numbering mode in vim is nonumber. You may go for other options by
adding the following to your .vimrc:

set number

or

set relativenumber

Extra

In case you have no idea about your <Leader> key, or rarely use it, I'd recommend giving the
following setting a try, put this in your .vimrc:

let mapleader = "\<Space>"

Then, invoking the <Space>n key sequence would cycle through the modes effortlessly.

Requirements

  • Vim 7.3 or later

License

MIT License

添加新评论