IEsc
‘ome (ine (@ eel [# ten |[S_ 6 teal sa [Bees aes |e] nese (etome] ise
| 3 4 Ox" |[- sax |= ce]
nse Watota E wi I SBon|[P ease] {pate |[} sce
qessserdl| W wars |[@_ soc |[T- i nese |[O Skee [sate || [> mise J ]> mie
sre ee'|[Desy K * |[Laseeal[: ise)": 8 [ta
[Asonend|| || dae Ke # > | ee ee|\- 2.
(Zz soit] [XK Bpek| [Cae [> inset] (en
[z-ssz"| [x sos ||aae| send ave. "ge || ana
HORT heap eta sper Notes,
direct action command,
if red, itenters insert mode
Fequires extra input
‘commands with a dot need
‘char argument afterwards
(EGRIFOOT] Bary] Bay
WORDs: Bar.) Baz)
words:
Fora graphical vi/vim tutorial & more ti
before a yank/paste/del command
(Sipboard
(3) duplicate operator to act on current tine
‘ Ga achetline, > indent ine)
to save & quit, ZQ to quit w/o saving
Visual mode:
‘Mave around and type operator to act
on selected region (vim only),
scroll cursor to top,
bottom, zz: center
top of file (vim onl
f open file under cursor (vim only)
to_www.viemu.com home of ViEmu, vi/vim emulation for Microsoft Visual Studiovi/vim lesson 1 - basic editing
JG) EI are vi/vim cursor keys ~ use them as they are much
closer than regular eursor keys
Use I}to enter insert mode, cursor turns from a block into a vertical
ine, and you can type in text. Use [Ese] to return to normal mode.
Use ix]to delete the current character, or[] to delete the one to
thelen
Use [i] to go insert text at the end of the line (wherever you are
in theline!)
ote: insert mode is actually very similar to a regular editor, you ean use
‘eursor/navigation keys, backspace, delete.)
wales | _|_ lashes
belivherh ot
[Blto undo the last action traditional vi has a single level, while vim
Supports unlimited undo (CTRL. -[Rlvo redo)
[D]iumps directly to the beginning ofthe ine, {iJto the end,
snd [ato the first non-blank
tomove slong ‘words’. A‘word’ isn sequence ofall
Alphanumericor punctuation signs: GUESS] Bas]] BSS]
Use SIIB) to move along WORDs. A "WORD is a sequence of
any non-blank characters EE] BET
Uae (R] to enter insert mode with an overstrike cursor, which
types over existing characters.
[Elialand press enter to save, E[qJand enter to qui.
\__Forthe rest of the tutorial & a full cheat sheet, go to www.viemu.com - home of ViEmu, vi/vim emulation for Microsoft Visual Studio| 3 4 5 6 7 8 9
followed by another key, moves the cursor to the next instance
of that character on the current line, JBI does the same backward:
Wand [1] do the same, but they stop right before the character.
[dldelete), followed, by any motion deletes the text between the
cursor and that motion’s destination [iJ],
Hichange) does the same, but leaves you in insert mode.
‘Some motions, such as[]] and [I] are linewise - deletion includes,
the full start/end lines.
[repeats the last editing action: text input, delete or change, ete.
Prepend a count to any command/motion to repeat it that number
‘oftimes:
Hz [iilto delete up to the second word.
HMlz]e] > |to delete up to but not including the second comma.
“2 [i repeats the text after you press (Esc) to finish the input session.
1 or MIM) to operate on the current line.
Only in vim, ]enters visual mode. Move around with motions, the
be highlighted. Press an operator to operate on that selection.
[enters visual-tines mode — like [¥], but selecting whole li
Repeat operator (
CTRL-Z] selects rectangular blocks.
For the rest of the tutorial & a full cheat sheet, go to www.viemuu.com - home of ViEmu, vi/vim emulation for Mierosoft Visual Studio