103.8 Basic file editing Flashcards

1
Q

How do you create a file from scratch with vi/vim?

A

Just enter #vi and start creating the file. No name of the file is needed at this point.

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

How do you create a file from scratch with vi/vim?

A

Just enter #vi and start creating the file. No name of the file is needed at this point.

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

What is the mode called that you land on when you first open vi/vim?

A

Command mode

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

What key within vi/vim takes you from command mode to insert mode?

A

The i key

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

What key within vi/vim takes you from insert mode to command mode?

A

The ESC key

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

What key in insert mode in vi/vim inserts a new line after the current line?

A

The o key

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

Which are the most common keys used to move around in vi/vim?

A

The k key moves up.
The h key moves left.
The l key moves right.
The j key moves down.

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

What key within vi/vim takes you from command mode to visual mode?

A

The v key

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

What key within vi/vim’s visual mode lets you select text from left to right?

A

Get the cursor to the left of what you want to select and press the L key or right arrow.

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

What key within vi/vim’s visual mode lets yank (copy) highlighted text?

A

The y key

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

What key within vi/vim’s visual mode lets you paste yanked text?

A

The p key

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

What key within vi/vim’s visual mode lets you undo a change?

A

The u key

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

How do you exit vi/vim?

A

:q or :q! from command mde (no changes are saved)

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

How do you save changes and exit vi/vim?

A

:wq or :wq! from command mode

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

How do you save a file you just created with vi/vim?

A

:w (then hit space bar) then type the name of the file and hit enter

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

What is the mode called that you land on when you first open vi/vim?

A

Command mode

17
Q

What key within vi/vim takes you from command mode to insert mode?

A

The i key

18
Q

What key within vi/vim takes you from insert mode to command mode?

A

The ESC key

19
Q

What key in insert mode in vi/vim inserts a new line after the current line?

A

The o key

20
Q

Which are the most common keys used to move around in vi/vim?

A

The k key moves up.
The h key moves left.
The l key moves right.
The j key moves down.

21
Q

What key within vi/vim takes you from command mode to visual mode?

A

The v key

22
Q

What key within vi/vim’s visual mode lets you select text from left to write?

A

Get cursor to the left of what you want to select

Press the L key or right arrow

23
Q

What key within vi/vim’s visual mode lets yank (copy) highlighted text?

A

The y key

24
Q

What key within vi/vim’s visual mode lets you paste yanked text?

A

The p key

25
Q

What key within vi/vim’s visual mode lets you undo a change?

A

The u key

26
Q

How do you exit vi/vim?

A

:q or :q! from command node (no changes are saved)

27
Q

How do you save changes and exit vi/vim?

A

:wq or :wq! from command node

28
Q

How do you save a file you just created with vi/vim?

A

:w (then hit space bar) then type the name of the file and hit enter

29
Q

How do you move the cursor to the bottom of a file within vi/vim?

A

Shift + g

30
Q

How do you delete a word in vi/vim command mode?

A

dw

31
Q

How do you move the cursor to the top of a file within vi/vim?

A

gg

32
Q

How do you move the cursor to the end of a line within vi/vim?

A

Shift A