Skip to content

Latest commit

 

History

History
102 lines (76 loc) · 1.98 KB

beginner.md

File metadata and controls

102 lines (76 loc) · 1.98 KB

Joy of Painting[1] with Bob Ross[2]

[1] - Vim
[2] - Shawn Biddle

Modality

Insert  - Brush is on the canvas
Normal  - Brush is off the canvas
Command - Mixing your pallette

Starting Vim

vim <file>
vim, :e <file>

Pen to the page

i - Enter insert mode at cursor
I - Enter insert mode at first non-blank character
s - Delete character under cursor and enter insert mode
S - Delete line and begin insert at beginning of same line
a - Enter insert mode _after_ cursor
A - Enter insert mode at the end of the line
o - Enter insert mode on the next line
O - enter insert mode on the above line
C - Delete from cursor to end of line and begin insert

This is a test sentence

(Next class will cover 'c')

Picking up the brush

ESC
Ctrl+[

Scanning the canvas

    k
    ^
h <   > l
    v
    j

"Why hjkl and not jkl;?"

Because go to the next class

"They invented the mouse, why not use that?"

La la la la, I can't hear you

Getting from a to b: Motions

Basics: wWbBeE

w - Forward to the beginning of next word
W - Forward to the beginning of the next WORD
b - Backward to the next beginning of a word
B - Backward to the next beginning of a WORD
e - Forward to the next end of word
E - Forward to the next end of WORD

Slightly less basic: fFtT All follow [(n)um]<n(o)un> syntax

[n]f<o> - Forward until (nth) (o)  (Inclusive)
[n]F<o> - Backward until (nth) (o) (Inclusive)
[n]t<o> - Forward until (nth) (o)  (Exclusive)
[n]T<o> - Backward until (nth) (o) (Exclusive)

abcdefg, abcdefg, abcdefg

Searching

/  - Forward
?  - Backward
*  - Word under cursor - forward  (bounded)
g* - Word under cursor - forward  (unbounded)
#  - Word under cursor - backward (bounded)
g# - Word under cursor - backward (unbounded)
n  - Next result, forward
N  - Next result, backward

(Note here to explain what bounded/unbounded mean)

Copy/Paste

y - Yank. Example: yw (yank word)
p - paste after cursor
P - paste before cursor

vim: set syn=mkd :