Run shell commands and output to file in Vim

Опубликовано: 09 Июль 2026
на канале: Now and Maybe Later
3
0

Run shell commands and output to file in Vim.

Inserting a file: https://neovim.io/doc/user/insert/#%3Aread

1. Enter normal mode with escape or "Esc".
2. Enter command mode with ":" (or shift + ";").
3. Pattern: ":r! command-here"

This will run the command and insert the output at the current cursor location.

Escape special characters with a single backslash; for example, change "date +%s" to "date +\%s".

Subtitles generated using Shotcut with whisper-cli (whisper.cpp version 1.9.1) and the Tiny English model (https://huggingface.co/ggerganov/whisper.c.... Subtitles were manually reviewed and edited.

Chapters

00:00 Documentation
00:18 Syntax
00:27 Example (ls)
00:41 Example (date)
00:55 Special characters (date +\%s)