Vi Editor

¡Supera tus tareas y exámenes ahora con Quizwiz!

How do know what line the cursor is on?

go into ex mode, press := enter

What mode lets you type commands, followed by a colon at the bottom of the screen?

ex mode (or colon mode)

What command 'copies' information to memory?

yy (yank)

What are the three modes of the Vi Editor?

Command, Ex, and Insert

How do you delete from the cursor to the end of the line?

From the command mode, press C

How do you type bash commands from the Vi Editor?

at ex mode, press :!command

How do you replace only one instance of a string in the document?

at ex mode, press :1s/This/That (1 being the line number)

How do you exit but not save?

at ex mode, press :q!

How do you save your file and exit?

at ex mode, press :wq

How do you replace text (for all terms in the document)?

at ex mode, type :%s/Thisterm/Thatterm

What mode makes use of (but not limited to) single-letter tasks?

command mode

How do you search for text? How do you move to the next instance?

from command mode, press /searchterm; press n to move forward to next term, N to move backward

How do you copy four lines of text?

from command mode, press 4yy

How do you search backwards? (opposite of /)

from command mode, press ?searchterm

How do you navigate to the end of the line?

from command mode, press A (automatically enters insert mode)

How do you navigate to the top of the page?

from command mode, press H (for home)

How do you navigate to the bottom of the page?

from command mode, press L (for last line)

How do you paste text on the line before the cursor? ... after (below) the cursor?

from command mode, press P; for under the cursor, press p

How do you begin typing in the next character after the cursor?

from command mode, press a

How do you delete and then type over a complete line of text?

from command mode, press cc

How do you replace just one word?

from command mode, press cw (will then enter insert after deleting word)

How do you delete one line? ...10 lines?

from command mode, press dd; for ten lines, press 10dd

What is the 'undo' option?

from command mode, press u

From the Vi Editor, how do you create a directory on your system?

from ex mode, press :!mkdir dirname

How do you open a file when Vi Editor is already open?

from ex mode, press :e/dir/filename

What mode allows you to type text in the file?

insert mode

How do you insert the contents of a file into the current editing session of Vi?

navigate to the area you need to insert the file, then enter ex mode and type: :r filename

How do you enter insert mode?

press escape, then enter i


Conjuntos de estudio relacionados

4.02 Endocrine System & 4.03 Reproductive System Questions

View Set