Thursday, December 17, 2015

Re: Is there a way to display line numbers and relative line numbers as with two rulers?

> in that case, you can create a vertical window, fill the buffer with the
> numbering
> and scroll bind it to the current window.

I tried this:
1. New vertical window (normal mode): vsp
2. Turn absolute numbering on (command mode): :set norelativenumber number
3. Scroll bind windows (command mode) :set scrollbind
4. Resize right window to only display ruler (normal mode): 4<C-W>|

Visually this looks great, but there are still two windows. I like to work with multiple windows and multiple buffers, so not really so great if this right-vertical window is constantly broken.

Is there some setting to have two rulers one on the left and one on the right in single window?


If I don't figure out any better idea, then I would probably use idea from some other post to map key to switch between relative to absolute numbering like:
:nnoremap <leader>n :set relativenumber!<CR>

--
--
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:

Post a Comment