0

I recently found out that you can move the cursor the beginning of a line quickly by line number like this:

:11

Regardless of your cursor position, this will move the cursor the beginning of line 11.

But what is the fastest way to move to the end of line 11?

7
  • 3
    fastest in User time or CPU (if you have a script that do thousands movements to end of lines) time?
    – Maxim Kim
    Apr 25, 2021 at 16:40
  • 2
    You should probably clarify your usecase: 11G$
    – Maxim Kim
    Apr 25, 2021 at 16:41
  • 3
    this will move the cursor the beginning of line 11 Only if :set startofline.
    – Matt
    Apr 25, 2021 at 16:46
  • 1
    An even faster way to move to the start of the 11th line would be to use 11G in normal mode. Not sure how to move to the end of line without scripting though...
    – Zorzi
    Apr 25, 2021 at 21:12
  • 1
    @statox That is good to know. Thanks Apr 26, 2021 at 15:12

1 Answer 1

1

As mentioned by @Maxime Kim a good way is: 11G$

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .