-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path15searchingWords.txt
44 lines (29 loc) · 1.06 KB
/
15searchingWords.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
15. Searching words: / (forward slash), ? (question mark), n, N, #, *
---------------
We're almost done!
To search the entire file of words, use:
/ - to start the search, and to go to next
? - to go to previous
n - advance forward
N - advance backwards
We can use this to search a long file for a variable name or any words.
To move to the next occurence of the word that your cursor is under, use:
* - move to the next occurence
# - move to the previous occurence
Put your cursor over the move word, and hop over to the previously occuring command.
Review Questions:
1) How would you find all occurring o's in this line?
2) What key repeaets a given find command?
Solution:
1) "fo" if you're finding ahead, "Fo" if you're finding behind.
2) ";"
!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!
!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!
!~! !~!
!~! CONGRATULATIONS!!! !~!
!~! You have completed !~!
!~! this course! !~!
!~! !~!
!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!
!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!
Remember to practice daily to improve!