NeoVim Thoughtz
Inserting Characters with Visual Block
I recently wanted to prepended dashes to a couple of lines to turn this:
Structure and Interpretation of Computer Programs by Gerald Jay Sussman
Computer Systems: A Programmer’s Perspective by Randal E. Bryant
Designing Data-Intensive Applications by Martin Kleppmann
into this:
- Structure and Interpretation of Computer Programs by Gerald Jay Sussman
- Computer Systems: A Programmer’s Perspective by Randal E. Bryant
- Designing Data-Intensive Applications by Martin Kleppmann
And I super forgot how. Here’s a quick guide for when I forget again.
- Enter
VISUAL BLOCK-ctrl + v - select rows -
j/k - Enter VB
INSERT-shift + I(THIS IS WHAT GOT ME! CAPITAL I!) - Enter characters -
-in this case - Indicate that you are finished -
esc
That’s it! Your prepend is applied to all lines!