Skip to content

tkhoa2711/vim-togglenumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Easy toggle between different number modes in vim

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published