Using /, I want to be able to search for (and jump to) the beginning and end of the file I am in.
Asked
Active
Viewed 1.3k times
6
WalksB
- 507
- 1
- 4
- 14
2 Answers
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
-
Welcome to [vi.se]! – D. Ben Knoble Aug 21 '23 at 12:52