0

I understand that to move to the beginning of the line blank space I have to use 0, but to move to the last blank space in the line '$' or 'end' sign move to the last character. How to move to the last blank space in a line?

3 Answers 3

1

I'm not sure I've understood your question correctly. I think you might want to move to the last non-whitespace character in the line.

In this case, the built-in :h g_ does just that (it's the end-of-line counterpart of _).

0

I don't think there's a built in for that, but you can do a search to jump to it/ [^ ]*$

This searches for a space, followed by zero or more non-spaces ([^ ]*), until the end of the line.

0

If line ends with "space" then $

Otherwise $Bh or $FSpace

2
  • You probably didn't understand my question.
    – Audrius
    Feb 6, 2022 at 0:28
  • 1
    @Audrew I think you should reword your question then, or provide an example. As it stands, I feel like this is an answer to it.
    – Biggybi
    Mar 7, 2022 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.