Tuesday, April 9, 2019

Re: plugin for toggeling line numbers

On Sun, Apr 07, 2019 at 01:51:55PM +0200, meine wrote:
>I found a site where a vim plugin was used for relative line numbering
>and I want to give it a try. relative line numbers make it easier to
>navigate in normal mode by just using `3j' instead of `256G'. the less
>keystrokes the better!
>
>vimawsome.com has two variants: `numbers.vim' and `vim-numbertoggle'.
>
...
>
>does anybody have experience with both of them? I'd be curious on your
>opinions! maybe there is a third one that is niftier, I'd like to know.

I have number and relativenumber set by default, and I use Pope's vim-unimpaired (https://github.com/tpope/vim-unimpaired) for handy toggling of common settings, including these.

I also use these autocmds:

" relativenumber only in current window
autocmd BufEnter,WinEnter,InsertLeave *
\ if &filetype !=# 'help' | setlocal relativenumber | endif
autocmd BufLeave,WinLeave,InsertEnter *
\ if &filetype !=# 'help' | setlocal norelativenumber | endif

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: