6

Using /, I want to be able to search for (and jump to) the beginning and end of the file I am in.

2 Answers 2

8

:h start-of-file and :h end-of-file

Patterns are, respectively, \%^ and \%$.

Example:

/\%^I am on first line
0

In very magic mode (\v), the patterns are respectively %^ and %$ (see :help /\v and :help start-of-file, scroll down for :help end-of-file).

1

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.