I was at one point very interested in the same idea. I wanted relative line numbers and absolute line numbers integrated together. So, I created a patch, called it `dnu` for "dual line numbering", and sent the suggestion to Bram Moolenaar. Here's what it looked like: http://i.imgur.com/NTwwB.jpg Here was the patch. I wrote it back in 2011: https://code.google.com/r/justinvh-vim/source/detail?r=c2479... Ultimately Bra…
Better line numbers for Vim
41–46 of 46 posts
Re: Better line numbers for Vim
#42In the video, the author moves a block of code by: 1. going to the start of the code block 2. changing mode to visual 3. moving to the end of the block 4. deleting the block 5. moving to the insertion point 6. inserting the delete buffer I'd like to suggest that using absolute line numbers shortens this considerably. For example :43,48m63 removes lines 43 to 48 and inserts them after line 63 regardless of the current…
I would argue that the author's way is the more idiomatic usage of vim.
Re: Better line numbers for Vim
#43I got to know the numbers plugin from http://vim.spf13.com/ This distribution gets you a really good head start on vim and lets you install additional plugins easily with its VBundle Integration and its customization options. And in case if you ever wondered, why the ESC key is used to change to normal mode, you should read up on the history of the escape key. Therefore I use CTRL- to switch to normal mode, so my han…
Be a Vim user, not an SPF13 user.
Also, you don't need to remap to as there's already or (the slightly different) .
And it's Vundle, not VBundle.
Re: Better line numbers for Vim
#44Honestly, if you already use powerline or familiar extension, you can look at the status bar for the absolute line. I find it's no need for changing between modes. And if you use Mac OSX and latest vim version installed by homebrew, in relative line number mode of vim, instead of 0 it is the row line number.
Re: Better line numbers for Vim
#45In the video, the author moves a block of code by: 1. going to the start of the code block 2. changing mode to visual 3. moving to the end of the block 4. deleting the block 5. moving to the insertion point 6. inserting the delete buffer I'd like to suggest that using absolute line numbers shortens this considerably. For example :43,48m63 removes lines 43 to 48 and inserts them after line 63 regardless of the current…
5dd
at the start of the block.Re: Better line numbers for Vim
#46In the video, the author moves a block of code by: 1. going to the start of the code block 2. changing mode to visual 3. moving to the end of the block 4. deleting the block 5. moving to the insertion point 6. inserting the delete buffer I'd like to suggest that using absolute line numbers shortens this considerably. For example :43,48m63 removes lines 43 to 48 and inserts them after line 63 regardless of the current…
You are technically correct, but coming up with those magic numbers(43, 48, 63) requires the user to manually try and find them, is more error-prone, and requires a whole lot more keypresses for larger blocks that don't fit on one screen. I would argue that the author's way is the more idiomatic usage of vim.