General Flashcards

1
Q

How do you search for the word under the cursor?

A

*

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

Delete to the end of a line

A

d$

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

Vim: Append at end of line

A

A

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

Delete character under cursor

A

x

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

VIM: Delete the word under the cursor

A

Get on the first letter than ‘dw’

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

Delete a word under the cursor but leave spaces so to reinsert another word

A

de

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

Move to start of line

A

0

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

Move two words forward
- Start of 3rd word
- end of 2nd word

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

Move to end of line

A

$

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

Vim: Delete ‘n’ number of words at same time

A

dnw

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

Delete a full line

A

dd

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

delete ‘n’ lines

A

ndd

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

place a freshly deleted (dd) line in the line under your current location

A

p
P will place before the cursor

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

Replace the character under the cursor

A

r-char

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

Remove rest of a word from after the cursor

A

ce

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

vim: Name of file/ line number

17
Q

Vim: Go to End of file

18
Q

Vim: Go to top of file

19
Q

Navigate to specific line

20
Q

Return to where you just came from

21
Q

Vim: Locate the paired bracket

A

% while on the lead

22
Q

vim: Search and replace first instance in a line

23
Q

Replace all instances in a line

A

s/old/new/g

24
Q

Replace all instances in a file

A

%s/old/new/g

25
Replace all instances in a file with per instance confirmation
%s/old/new/gc
26
Run a shell command
:! Command
27
Visual selection
v then cursor
28
Retrieve (insert) file or command
:r command/file
29
Move to end of just the next word
e
30
Replace a full word
R
31
Navigate to the end of the next line
j$
32
visual mode
v
33
Copy one word
yw
34
paste before cursor
P
35
Ignore case for searching
:set ic
36
Ignore case just to search one word
:/search \c
37
Navigate to start of text on line (but not absolute start of line)
_ (underscore)
38
Jump ON to a specific character
f-char (first instance of) I.e. “f(“ F to reverse
39
Jump UP to (just before-insert) a specific character
t-char T to reverse