Integrating Shell Commands Into Vim¶
Resources¶
Basics¶
:.!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.
Running on a visual selection¶
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.
Running on specific range¶
The above can also be run as: