Command Line¶
Resources¶
Send escape in a command¶
<C-v><Esc>
will print ^[
which will send escape in the command.
Join lines¶
Visually select the lines. :'<,'>j
Or, [range]j[lines]
. eg. 5j20
would go to line 5, and join the next 20
lines.
Integrating directly with the shell¶
:.!bash
will send the current line to the shell, and replace the line with the
command output. bash
can be any other shell command.
For example, running :.!python
on:
will replace the line with
More here.
Format embedded JSON in a markdown file¶
Let's say you have some JSON in a markdown file like this:
Visually select the lines containing the JSON content, and run
Inspiration from this post.