Search Flashcards

1
Q

Go start of file

A

gg

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Go to end of file

A

G

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Show file info and current line number

A

Ctrl + g

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Go to line

A

line number followed by G

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Search command

A

/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Search for a phrase in reverse direction

A

?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Next search result

A

n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Previous search result

A

N

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Return to start location

A

Ctrl + O

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Find matching parentheses

A

%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Subsitute command syntax

A

s/old/new/g (This will subsitute new for old). The g flag will make the changes globally within the line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Subsitute within a range of line

A

:#,#s/old/new/g

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Subsitute within whole file

A

:%s/old/new/g

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Subsitute within whole file and prompt to make change

A

:%s/old/new/gc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Find next character match in line

A

fx (subsitute x for whatever character you want go to the next instance of)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Change case when in Visual Mode

A

U (to capitalise) or u (to lowercase)

17
Q

Copy whole line in visual mode

A

Y

18
Q

Set highlight search results

A

:set hls

To remove highlights, :set nohlsearch

19
Q

Set ignore case for search

A

:set ic

To remove ignore case, : set noic

20
Q

Open help files

A

:help

21
Q

Open specific help file

A

find the entry
Move the cursor to the tag |bugs|
Ctrl + ]