https://github.com/tkhoa2711/vim-togglenumber
Easy toggle between different number modes in vim
https://github.com/tkhoa2711/vim-togglenumber
plugin vim vim-togglenumber
Last synced: 11 months ago
JSON representation
Easy toggle between different number modes in vim
- Host: GitHub
- URL: https://github.com/tkhoa2711/vim-togglenumber
- Owner: tkhoa2711
- Created: 2015-05-31T17:39:16.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T10:58:17.000Z (almost 6 years ago)
- Last Synced: 2023-03-13T10:45:31.886Z (over 3 years ago)
- Topics: plugin, vim, vim-togglenumber
- Language: Vim script
- Homepage:
- Size: 23.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
vim-togglenumber
================
[](https://app.codacy.com/app/tkhoa2711/vim-togglenumber?utm_source=github.com&utm_medium=referral&utm_content=tkhoa2711/vim-togglenumber&utm_campaign=Badge_Grade_Dashboard)
[](https://travis-ci.org/tkhoa2711/vim-togglenumber)
[](https://opensource.org/licenses/MIT)
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.
Installation
------------
If you use [pathogen](https://github.com/tpope/vim-pathogen), clone the repo as below:
```sh
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](https://github.com/VundleVim/Vundle.vim) way: add the following line to your `.vimrc`,
save it and then run `:PluginInstall`.
```viml
Plugin 'tkhoa2711/vim-togglenumber'
```
Usage
-----
By default, the plugin is triggered with `n`. However you can add your own
preferred mapping such as:
```viml
nnoremap :ToggleNumber
```
The standard numbering mode in vim is `nonumber`. You may go for other options by
adding the following to your `.vimrc`:
```viml
set number
```
or
```viml
set relativenumber
```
Extra
-----
In case you have no idea about your `` key, or rarely use it, I'd recommend giving the
following setting a try, put this in your `.vimrc`:
```viml
let mapleader = "\"
```
Then, invoking the `n` key sequence would cycle through the modes effortlessly.
Requirements
------------
- Vim 7.3 or later
License
-------
MIT License