Keys Flashcards

1
Q

h, j, k, l, gj

A

h Left, j down, k Up, l right. gj Down, down line by line even if its wrapped

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

y, p

A

Yank copy, Print paste

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

/

A

Search

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

f character, optional ;, F

A

Go to next character. ; Go to next occurance. F Go to previous character

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

w W. b B, e

A

Go to next word. BigW is WORD-_78 which is 1 word. Go to previous word. e Go to end of next word

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

t character, T

A

Go to before the chatacter. T backwards go previous character after it

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

0 ^ $

A

0 moves to first character of line. ^ first non blank character of line. $ goes to end of line

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

{, ctrl D. } ctrl U

A

{ down paragraph, ctrl D half page down.

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

/ pattern enter. ? pattern enter

A

Search forward. ? To search backwards. n next match or N previous match. Space .* Means selects all?

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

gd gf

A

Go to definition of whatever under Ur cursor. gf go to file in an import

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

gg. Line gg. G. %

A

Go to top of file. Line gg go to that line number. G end of file. % jump to matching bracket

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

d2w, dd. D. dt; d/cu

A

Delete 2 words. dd delete line. D delete after cursor. dt; delete until ;. At cursor delete to search cu enter.

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

u. ctrl r

A

Undo, redo

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

ggdG

A

Delete whole document

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

d f c t.

A

Delete, find, change, unTil. ffct’ find f, change until ‘.

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

c, cc, C; ci” cw ciw, ca(

A

cw Change: delete current word and goes into insert mode start typing. cc complete line. C cursor afterwards. ci” change inner- changes everything inside “”, cursor can be anywhere inside “”. ciw change word anywhere inside that word whereas cw cuts at cursor. ca( delete inside including (. ci( just deletes inner, not around.

17
Q

.

A

repeat the command

18
Q

text object a, i, w, s, p, “

A

a around, i inner, w word, s sentence, p paragraph, “ quotes. operator a i textObject

19
Q

y, p, g~, gu, gU, >,

A

y yank copy, p put paste, g~ switch case (lower to upper case), gu make lowercase, gU make uppercase. > shift right adds indentation. < shift left removes indentation. = format code. copy line, then p to paste it

20
Q

x, X, s, r, ~

A

x dl deletes character under cursor. X dh deletes character before cursor. s ch deletes character under cursor and puts into insert mode. r allows you to replace 1 single character for another. ~ switch case for single character

21
Q

d4j, 5dd, dap

A

deletes 5 lines. delete all paragraph.

22
Q

i I a A

A

i insert before cursor. I insert at beginning of line. a append after cursor. A append at end of line

23
Q

o, O

A

open a new line below current line, O open new line above current line.

24
Q

gi, ge

A

go back to last place where you made a change. reverse of e

25
Q

i mode: ctrl h, ctrl w, ctrl u

A

ctrl h remove last character you typed. ctrl w remove last word. ctrl u remove last line (undo this line).

26
Q

v V C-V

A

v character wise visual mode. V line wise visual mode. C-V for block-wise visual mode

27
Q

yypci”

A

copy entire line, paste below, change all text inside “ “ and start typing. fh enter cw - find h, clear word and start typing.

28
Q

/redap?coP

A

go to re, delete all paragraph, reverse go to co, paste all above.

29
Q

yiw go to new word viwp

A

yank inner word (copy word). Go to new word past over word.