Numbers.vim - better line numbers for vim
11–20 of 47 posts
Re: Numbers.vim - better line numbers for vim
#12I find line numbers on the side clutter up my view too much. I always use 80 character terminal widths, to make it easier to stick to my PEP8 validation script we run.
Re: Numbers.vim - better line numbers for vim
#13Do you really need a plugin for this? If you want relative numbers to appear when in normal mode, and absolute line numbers to appear otherwise (e.g., when the window has lost focus), just throw this in your .vimrc: set rnu au InsertEnter * :set nu au InsertLeave * :set rnu au FocusLost * :set nu au FocusGained * :set rnu Here's a gist for posterity. Feel free to fork it, leave comments on what should be changed, etc…
" use Ctrl+L to toggle the line number counting method
function! g:ToggleNuMode()
if(&rnu == 1)
set nu
else
set rnu
endif
endfunc
nnoremap :call g:ToggleNuMode()Re: Numbers.vim - better line numbers for vim
#14I'm still pondering the "how is this useful?" part... why are absolute numbers useful for you in insert mode?
My exact thought. I absolutely love 'relative line numbering' as it lets me use different VIM commands without having to do math. And as I can go to any line number by typing ': ' [generally reported by debugger or other means], I don't really care about actual line numbers anymore.
Re: Numbers.vim - better line numbers for vim
#15I'm still pondering the "how is this useful?" part... why are absolute numbers useful for you in insert mode?
Re: Numbers.vim - better line numbers for vim
#16I know some people like line numbers, but personally, I just look at the status bar at the bottom of the buffer. I find line numbers on the side clutter up my view too much. I always use 80 character terminal widths, to make it easier to stick to my PEP8 validation script we run.
Re: Numbers.vim - better line numbers for vim
#17Yes you can toss some commands and code snippets at me and ask me to use them to get these features. But not having to type commands/snippets and have all goodies out of the box is what modern text editors like sublime text are all about.
Re: Numbers.vim - better line numbers for vim
#18I know some people like line numbers, but personally, I just look at the status bar at the bottom of the buffer. I find line numbers on the side clutter up my view too much. I always use 80 character terminal widths, to make it easier to stick to my PEP8 validation script we run.
That's fine for determining what line you're on, but visible line numbers make it much easier to jump to a particular line. I've only recently set number in my .vimrc and wish I'd have done it sooner.
Re: Numbers.vim - better line numbers for vim
#19Re: Numbers.vim - better line numbers for vim
#20Do you really need a plugin for this? If you want relative numbers to appear when in normal mode, and absolute line numbers to appear otherwise (e.g., when the window has lost focus), just throw this in your .vimrc: set rnu au InsertEnter * :set nu au InsertLeave * :set rnu au FocusLost * :set nu au FocusGained * :set rnu Here's a gist for posterity. Feel free to fork it, leave comments on what should be changed, etc…
I can imagine some reasons why it might be useful to have it as a plugin. Making a plugin means giving it a name and a URL (and if it's on vim.org, a place in a well-known directory), and that makes discovery and communication of its existence easier. The fact that it's useful to have a gist for it bears this out, I think. I can't think of why it's that bad a thing to have a plugin for it.