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
Blank was the first full-screen text editor written for Unix.
vi
26
A new version of Vi was created and called "vi improved" or blank.
vim
27
Although the vi editor is useful for editing configuration files, it shines in editing program files such as blank
shell scripts
28
At any given moment, vi is running one of what three modes
Command mode Ex mode Insert mode
29
In vi, the blank mode accepts commands, which are usually entered as single letters.
Command mode
30
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.
Ex mode
31
In vi, you enter text in blank mode
Insert mode
32
When you first launch vi, you are in blank mode.
command mode
33
In vi, how do you switch to insert mode
type I
34
In vi, how is the insert mode indicated on the screen?
the word --INSERT-- will be on the bottom of the window
35
In vi, how do you exit insert mode?
Press ESC
36
Type blank to enter ex mode in vi, and then type blank to write and quit
:wq
37
In vi, what keystroke opens a new line immediately below the line where the cursor is and enters insert mode
O
38
In vi, what command would be used to yank two lines
2yy (without hitting enter)
39
In vi what command pastes starting on the line after the cursor
p
40
In vi, what do you type to delete a line
dd
41
In vi, what do you type to save and exit a file which is equivalent to :wq
ZZ
42
In vi, you can use the blank key to change case
tilde(~)
43
In vi, to undo any change, type blank
u
44
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
o
45
In vi, how do you search for text in a file?
type / in command mode, followed by the term you want to search
46
In vi, how do you search backwards?
type ?
47
In vi, the blank command changes text from within the command mode
c
48
What does cw do in command mode of vi?
changes the next word
49
What does cc do in command mode of vi?
changes the next line
50
In vi, the blank key brings you to a line number that you specify
G
51
In vi, the blank key homes the cursor - that is moves it to the top of the screen
H
52
In vi, the blank key moves the cursor to the bottom of the screen
L
53
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
:%s/original/replacement/g
54
To save your vi file without exiting the editor type blank in command mode
:w
55
In vi, the blank command edits a new file
:e
56
In vi, the blank command includes the contents of an old file into an existing file, appending it to the existing file
:r
57
In vi, the ex command blank executes the external command that you specify, for example ls
:!
58
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
:q !
59
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
D
60
What keystrokes invoke the nano search function? (Choose all that apply) A. F3 B. F6 C. Esc-S D. Ctrl-F E. Ctrl-W
B,E
61
How would you remove two lines of text from a file when using vi?
2dd
62
True or False: Unicode is useful for encoding most European languages but not languages in Asia
False
63
True or False: GUI text editors for ASCII are superior to text-mode ASCII editors because GUI editors support underlining, italics, and multiple fonts
False
64
True or False: if you've never used a text editor before, nano is usually the best one to learn first
True
65
Three keystrokes that can initiate a search-and-replace operation in nano are blank, blank, and blank
Ctrl+/, F4, Esc+R
66
While in vi's command mode, you can type blank to undo a change
u
67
To save a file and exit the vi text editor in command mode, type blank
cw
68
ASCII supports blank unique characters (not including control characters)
128