Chapter 8 Vim Editor lets You Replace Text String With

Document Type
Test Prep
Book Title
Guide to Parallel Operating Systems with Windows 7 and Linux (Networking) 2nd Edition
Authors
Ron Carswell, Shen Jiang, Terrill Freese
Chapter 8: Text Editors
TRUE/FALSE
1. The DOS Edit and Vim programs are installed by default when you install the operating system.
2. The default mode of the Vim editor is Visual.
3. You can only use the DOS Edit Paste command to place text from the edit buffer after first using the
Cut or Copy command.
4. A TextPad regular expression can have up to three tagged expressions, numbered according to their
order in the regular expression.
5. To perform a Vim editor search-and-replace operation on an entire document, place a $ sign before the
:substitute command.
MULTIPLE CHOICE
1. In DOS Edit, you can select menu items by holding down the ____ key and pressing a second key that
corresponds to the menu option.
a.
Ctrl
c.
Shift
b.
Alt
d.
Fn
2. To create a file in DOS Edit, type ____ at the command prompt to start DOS Edit, and then begin
typing in the document window.
a.
edit
c.
text
b.
document
d.
file
3. To open a second window in DOS Edit , press Alt+V and then press the ____ key.
a.
C
c.
S
b.
F
d.
X
4. When working with C++ files in TextPad, you save them by selecting ____ from the File Format list
box in the Save As dialog box.
a.
Mac
c.
UNIX
b.
No Change
d.
PC
5. If you are not sure which file you are using in Vim, type ____ to place brackets around the active file.
a.
:next
c.
:split
b.
:args
d.
:previous
6. To ____ text in DOS Edit, press Alt+E and then press the T key.
a.
paste
c.
capitalize
b.
copy
d.
cut
7. In TextPad, you must ____ text before using the Cut or Copy command.
a.
highlight
c.
italicize
b.
bracket
d.
embolden
8. To ____ the mouse, click and hold the left mouse button while moving over the text.
a.
reset
c.
unfreeze
b.
drag
d.
freeze
9. To paste text from the Windows Clipboard, you can use the keyboard shortcut Ctrl+ ____.
a.
C
c.
V
b.
P
d.
X
10. To cut a line from a document in the Vim editor, use the arrow keys to position the cursor anywhere on
the line you want to cut and then type the ____ command.
a.
cc
c.
u
b.
dd
d.
v
11. To save a Vim file and quit the editor, type ____ and then press Enter.
a.
:q
c.
:wq
b.
:exit
d.
:quit
12. To repeat a text string search in DOS Edit, press ____.
a.
Alt+S
c.
Alt+C
b.
Alt+W
d.
F3
13. Which option in the TextPad Find dialog box enables you to find the next instance of a search pattern
in all open documents simultaneously?
a.
Regular expression
c.
In all documents
b.
Wrap searches
d.
Extended selection
14. To clear a bookmark within TextPad, click the Search menu and then click ____.
a.
Next Bookmark
c.
Toggle Bookmark
b.
Invert All Bookmarks
d.
Clear All Bookmarks
15. To search for more than one word or command in Vim, use regular ____.
a.
phrases
c.
terms
b.
expressions
d.
variables
16. In TextPad’s Replace dialog box, you would select the ____ button to replace the current text selection
and find the next occurrence.
a.
Replace Next
c.
Find Next
b.
Replace All
d.
Replace
17. Which TextPad replacement expression substitutes the contents of the Clipboard?
a.
&
c.
\n
b.
\c
d.
\p
18. To shut down a virtual machine, click System, click Shut Down, and then click the ____ button.
a.
Turn Off
c.
Shut Down
b.
Close
d.
Exit
19. Which magic character replaces text with the whole matched pattern?
a.
\0
c.
\2
b.
\1
d.
\9
20. In the Vim editor, to recall the last typed command, type ____ and then press the Up arrow key.
a.
:
c.
:r
b.
:%
d.
:t
21. To quit the Vim editor without saving your changes, type ____.
a.
:q
c.
:wq!
b.
:q!
d.
:wq
COMPLETION
1. DOS Edit is a text ____________________ that allows you to create, edit, save, and print ASCII text
files.
2. If you repeatedly work with the same set of files in TextPad, you should use a(n)
____________________.
3. A handy feature in text editors is the Search or Find command, which lets you locate a text
____________________ (a series of characters) in a document.
4. In Vim, the term used for search-and-replace operations is ____________________.
5. In Vim, a(n) ____________________ search does not encompass the entire document; it only searches
for the pattern on the line that contains the cursor.
MATCHING
Match each item with a statement below.
a.
magic characters
f.
TextPad
b.
:noh command
g.
tagged expression
c.
edit buffer
h.
regular expression
d.
Vim editor insert mode
i.
search-and-replace operation
e.
hexadecimal
1. Text editor created according to Windows 7 user-interface guidelines.
2. DOS Edit temporary holding area used by cut, copy, and paste operations.
3. A numbering system that uses a base of 16.
4. Helps you describe patterns in search strings when using the DOS FINDSTR command.
5. Used to remove all highlighting in the Vim editor.
6. Lets you replace a text string with another string throughout a document.
7. Special characters in the Vim editor used as wildcards in search patterns and strings.
8. A regular expression that starts with the character pair “\(” and ends with the pair “\)”.
9. Used to enter text.
SHORT ANSWER
1. Provide an overview of DOS Edit.
2. Identify and describe the three Vim editor modes.
3. Describe the options you have for saving files in DOS Edit.
4. If you are using a workspace in TextPad, what are the consequences of closing and opening files while
the workspace is open?
5. Describe how TextPad interacts with the Windows Clipboard.
6. How do you copy text using the Vim editor?
7. If you know the exact spelling of a word, what quick search options are available in the Vim editor?
8. What is the text string search-and-replace operation?
9. Describe two search-and-replace modes used by most text editors.
10. What is the relationship among tagged expressions, regular expressions, and replacements?

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.