What are some good ideas for using "relativenumber" in Vim?
过去多啦不再A梦2017-05-16 16:37:28
0
2
769
It is indeed useful, but leaving it on all the time still seems to have some side effects Mapping a shortcut key feels a bit "unnecessary" Is there some kind of automated idea?
Imagine when you want to copy and delete multiple lines of code. If you use absolute line spacing, you can delete line by line, but it will be very awkward if you copy line by line. You can either delete/copy by calculating relative line spacing (d10d), but Calculating line spacing takes time. Using relative line spacing, you can intuitively see how many lines I want to delete/copy
It would be more useful to know exactly how many lines to move up/down, and it feels suitable for movement in a small range.
Line numbers are generally not used a lot. To move a large block, you can scroll or
text-object
move. You can almost locate it with a few clicks.How to use it depends on personal preference.
Imagine when you want to copy and delete multiple lines of code. If you use absolute line spacing, you can delete line by line, but it will be very awkward if you copy line by line. You can either delete/copy by calculating relative line spacing (d10d), but Calculating line spacing takes time. Using relative line spacing, you can intuitively see how many lines I want to delete/copy