Chapter 10 Flashcards

1
Q

Broadly speaking, text editors fall into one of what two categories

A

text-mode and GUI

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

The blank editor is a Unix staple. It’s small and usually installed by default, so you can be fairly certain that it’s present on any Linux computer

A

vi

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

Vi uses multiple blank, and you must switch between them to accomplish various tasks

A

editing modes

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

The blank editor is a big editor with lots of features, so it’s less likely to be installed by default on small, lightweight distributions

A

emacs

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

Several small editors are modeled after emacs but omit many of its advanced features. One of these editors is blank, which is small, lightweight and easy to use.

A

nano

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

The blank editor is both a text-mode editor, and a GUI editor

A

emacs

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

The GNOME desktop environment has an associated text editor known as blank

A

gedit

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

Blank and blank are editors that are associated with the K Desktop Environment (KDE).

A

KWrite and Kate

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

The blank editor is not tied to any particular desktop environment, and it’s small and lightweight. It also runs under other OSs than Linux.

A

Geany

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

What is the syntax to launch a nano file with a new document

A

nano filename.txt

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

Most editing programs have what three basic convention for displaying information

A

Title Bar
Status Bar
Shortcut List

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

In addition to control characters, nano uses blank to activate some functions. These key combinations use either the ESC, ALT of META key followed by another key.

A

metacharacters

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

What is the nano keystroke for copy?

A

M-6

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

What is the nano keystroke for paste?

A

Ctrl-U

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

What is the nano keystroke for cut?

A

Ctrl-K

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

What is the nano keystroke for go to the next line in the file?

A

Ctrl-N

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

What is the nano keystroke for help documentation?

A

Ctrl-G

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

What is the nano keystroke to move to the start of the file

A

M-/

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

Can you copy multiple lines and paste them all at the same time in nano?

A

yes

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

Pressing blank or blank enables you to insert another file into the current one at the cursor’s current position in nano

A

Ctrl-R or F5

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

In nano, pressing blank or blank activates a search feature

A

Ctrl-W or F6

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

In nano, you can replace one string with another by pressing blank or blank. The program prompts you to enter a search term and the term to take its place.

A

Ctrl+/ or M-R

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

In nano, one way to save a file is the CTRL-blank option

A

Ctrl-O

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

What nano command allows you to save and exit at the same time?

A

Ctrl-X

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

Blank was the first full-screen text editor written for Unix.

A

vi

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

A new version of Vi was created and called “vi improved” or blank.

A

vim

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

Although the vi editor is useful for editing configuration files, it shines in editing program files such as blank

A

shell scripts

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

At any given moment, vi is running one of what three modes

A

Command mode
Ex mode
Insert mode

29
Q

In vi, the blank mode accepts commands, which are usually entered as single letters.

A

Command mode

30
Q

In vi, to manipulate files, you use blank mode, which you enter by typing a colon (:) followed by the name of the command you want to use.

31
Q

In vi, you enter text in blank mode

A

Insert mode

32
Q

When you first launch vi, you are in blank mode.

A

command mode

33
Q

In vi, how do you switch to insert mode

34
Q

In vi, how is the insert mode indicated on the screen?

A

the word –INSERT– will be on the bottom of the window

35
Q

In vi, how do you exit insert mode?

36
Q

Type blank to enter ex mode in vi, and then type blank to write and quit

37
Q

In vi, what keystroke opens a new line immediately below the line where the cursor is and enters insert mode

38
Q

In vi, what command would be used to yank two lines

A

2yy (without hitting enter)

39
Q

In vi what command pastes starting on the line after the cursor

40
Q

In vi, what do you type to delete a line

41
Q

In vi, what do you type to save and exit a file which is equivalent to :wq

42
Q

In vi, you can use the blank key to change case

43
Q

In vi, to undo any change, type blank

44
Q

In the vi command mode, typing blank (lowercase) opens text, that is, inserts a new line immediately below the current one and enters insert mode on that line

45
Q

In vi, how do you search for text in a file?

A

type / in command mode, followed by the term you want to search

46
Q

In vi, how do you search backwards?

47
Q

In vi, the blank command changes text from within the command mode

48
Q

What does cw do in command mode of vi?

A

changes the next word

49
Q

What does cc do in command mode of vi?

A

changes the next line

50
Q

In vi, the blank key brings you to a line number that you specify

51
Q

In vi, the blank key homes the cursor - that is moves it to the top of the screen

52
Q

In vi, the blank key moves the cursor to the bottom of the screen

53
Q

In vi, to replace all occurrences of one string with another type blank where original is the original string, replacement is the new string, and % should be the starting line number, ending line number for a small range change

A

:%s/original/replacement/g

54
Q

To save your vi file without exiting the editor type blank in command mode

55
Q

In vi, the blank command edits a new file

56
Q

In vi, the blank command includes the contents of an old file into an existing file, appending it to the existing file

57
Q

In vi, the ex command blank executes the external command that you specify, for example ls

58
Q

In vi, use the blank command to quit. like the e command, it won’t exit without saving unless you append the command with blank, which forces quit without saving the modifications

59
Q

For which type of file is nano least likely to be useful for examining or editing?

A. A text file encoded in Unicode
B. A shell script file
C. A text file encoded in ASCII
D. A LibreOffice word document
E. A Linux configuration file

60
Q

What keystrokes invoke the nano search function? (Choose all that apply)

A. F3
B. F6
C. Esc-S
D. Ctrl-F
E. Ctrl-W

61
Q

How would you remove two lines of text from a file when using vi?

62
Q

True or False: Unicode is useful for encoding most European languages but not languages in Asia

63
Q

True or False: GUI text editors for ASCII are superior to text-mode ASCII editors because GUI editors support underlining, italics, and multiple fonts

64
Q

True or False: if you’ve never used a text editor before, nano is usually the best one to learn first

65
Q

Three keystrokes that can initiate a search-and-replace operation in nano are blank, blank, and blank

A

Ctrl+/, F4, Esc+R

66
Q

While in vi’s command mode, you can type blank to undo a change

67
Q

To save a file and exit the vi text editor in command mode, type blank

68
Q

ASCII supports blank unique characters (not including control characters)