6

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

WalksB
  • 507
  • 1
  • 4
  • 14

2 Answers2

8

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

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

Example:

/\%^I am on first line
B Layer
  • 19,834
  • 2
  • 30
  • 57
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).

D. Ben Knoble
  • 26,070
  • 3
  • 29
  • 65
Kevin
  • 1