Commands Flashcards

1
Q

How do you quit a file

A

:q

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

How to quite a file since last update

A

:q!

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

How to exit save the file

A

:wq

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

How to save the file and exit file

A

:wq

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

How to move the cursor down

A

j

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

How to move the cursor up

A

k

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

How to move cursor to the right

A

l

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

How to move cursor to the left

A

h

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

How to update parts of the code

A

i
I puts you into insert mode where you can update the file

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

How do you leave insert mode

A

click escape

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

How do you delete a line in vim

A

dd
copys line to clipboard as well

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

How to move all the way down

A

G

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

How to go to the top

A

gg

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

How to move up and down blocks of code

A

{ and }

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

How to move down a certain amount of lines

A

number j
ex: 25j

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

Command to undo

A

u

17
Q

command to redo

A

ctrl + r

18
Q

How to copy a line of code

A

yy

19
Q

how to paste a line of code

A

p for below
P for above

20
Q

How to go into visual Mode

A

v

21
Q

how to go into insert mode and add a line

A

o for adding above
O capitalized for adding above