VimHandler activates in source (edit) mode only. Two modes:
- Insert: standard typing, Esc enters normal mode
- Normal: vim navigation and editing, i/a/o/O enter insert
Normal mode commands:
h/j/k/l: cursor movement
w/b: word forward/back
0/$: line start/end
gg/G: document start/end
i/a/o/O: enter insert mode
x: delete char
dd: delete line
u: undo
Ctrl+r: redo
New: macros.ts with MacroDef, parseBlockMacro, matchInlineMacro,
buildMacroTags, processInlineMacros.
Macro syntax:
@user — bare, no args
@user() — empty parens, same as bare
@npc(Goblin King) — self-closing with args
@style(box center — block: no closing paren on first line
Content here. — content on subsequent lines
) — closing paren on its own line
Unknown macro names now render as an error:
<span class="ribbit-error">Unknown macro: @bogus</span>
The verbatim keyword causes the contents to render as literals and also
preserves line breaks.