3 ms·
Then don't do that. Edit your code block over at the left margin as you would normally edit any code. Then do a block insert of 4 spaces down the left side of
by read_wharf 14y ago
Then don't do that.
Edit your code block over at the left margin as you would normally edit any code. Then do a block insert of 4 spaces down the left side of your code block. That's how I do it.
line of code
line of code
indented line of code
line of code
In vim, after editing your code like you usually would:
Go to the front of the top line,
Ctrl-V to enter visual block mode (Ctrl-Q on windows),
jjj to the bottom line,
I (capital I) to insert at the front,
space space space space,
escape.
I did exactly that to create the above two blocks.
- pge 14y agoin vim, you can also use ">>" command which indents a line. if you use python, your vim is probably already set up to indent four spaces, so the above can be done with "4>>" (=indent next four lines)
- zecho 14y agoOne of the few times I find myself in visual mode is when I'm indenting lines. v{motion}>> or <<. Super useful.
- libria 14y agoOr Capital V jjjjj > Or 6>>