Skip to content

Commit d537b0d

Browse files
committed
Add Search Backward Through A File as a vim til
1 parent 0c59d05 commit d537b0d

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
1010
For a steady stream of TILs from a variety of rocketeers, checkout
1111
[til.hashrocket.com](https://til.hashrocket.com/).
1212

13-
_770 TILs and counting..._
13+
_771 TILs and counting..._
1414

1515
---
1616

@@ -847,6 +847,7 @@ _770 TILs and counting..._
847847
- [Rotate Everything By 13 Letters](vim/rotate-everything-by-13-letters.md)
848848
- [Running Bundle With vim-bundler](vim/running-bundle-with-vim-bundler.md)
849849
- [Scrolling Relative to the Cursor](vim/scrolling-relative-to-the-cursor.md)
850+
- [Search Backward Through A File](vim/search-backward-through-a-file.md)
850851
- [Searching For Hex Digits](vim/searching-for-hex-digits.md)
851852
- [Set End Of Line Markers](vim/set-end-of-line-markers.md)
852853
- [Set Your Color Scheme](vim/set-your-color-scheme.md)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Search Backward Through A File
2+
3+
There are a number of ways to search for a match in a file. One I use quite
4+
often is hitting `*` while the cursor is over the word I want to find
5+
matches for. It searches forward jumping to the next occurrence of that
6+
word.
7+
8+
It turns out there is a way of doing the same thing, but searching backward
9+
to the previous occurrence of the word. If you hit `#` with the cursor over
10+
a word, it will jump backward through the file until it finds an occurrence
11+
of that word. Keep hitting `#` to keep searching backward.
12+
13+
See `:h #` for more details.

0 commit comments

Comments
 (0)