search

Home  >  Q&A  >  body text

What are some good ideas for using "relativenumber" in Vim?

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?

过去多啦不再A梦过去多啦不再A梦2778 days ago813

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-05-16 16:39:28

    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-objectmove. You can almost locate it with a few clicks.

    How to use it depends on personal preference.

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-16 16:39:28

    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

    reply
    0
  • Cancelreply