Editing Flashcards
Insert characters
i
Append to current word
a
Append to end of line
A
Delete current character
x
Delete current line
dd
Delete Word
dw (deletes entire word when cursor at the first character of a word)
Delete to the end of the line
d$
Move forward five words
5w (use 5e to move to end of the word of the fifth word)
Delete the next 3 lines
3dd
Undo last change
u
Undo all changes on line
U
Redo the last edit
Ctrl + R
Add the current contents of the register with the put command
p (similar to paste)
Replace
r
Change operator (change current word ending from where the cursor is)
ce
Change ending of line from where cursor is
c$
Open a new line below cursor
o
OPen a new line above cursor
O
Append after cursor
a
Replace more than one character
R
In Visual mode, copy (or yank) selected text
y
Move cursor to end of next line
j$
Yank one word
yw
Set search option to highlight words
:set hcl (:nohclsearch to remove highlighting)
Set search to ignore case
:set ic (to disbale :set noic)
Set the increment search option
:set is
Copy to clipboard register
“+yy
+ is reserved for the clipboard
Autocomplete
Ctrl + p
Toggle letter case
Make the selection in visial mode.
Then U for upper case, u for lower case.
Insert output of a command into a file
:r !ls
This would add the output of the ls command into a file
Insert the contents of a file into another fille
:r sample.txt
This would add the contents of sample.txt into the current file
What mode does would the following displaying in the command area suggest:
’
Visual selection mode
Write a selected text to file in visual mode
:‘w
Append selected text to file in visual mode
:‘w»
Repeat the last used macro
@@
Autocomplete
Ctrl + p