Using Vim filters
This commit is contained in:
parent
c9831e2552
commit
b70d6aed7a
1 changed files with 16 additions and 0 deletions
16
source/_zets/31.md
Normal file
16
source/_zets/31.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
title: Using Vim filters
|
||||||
|
date: 2025-07-12 23:13:54
|
||||||
|
tags:
|
||||||
|
- vim
|
||||||
|
---
|
||||||
|
|
||||||
|
In Vim, insert some text into a file, such as `date`.
|
||||||
|
|
||||||
|
In insert mode, press `!!` to switch to command mode and see a `:.!` prompt.
|
||||||
|
|
||||||
|
Enter a command, like `bash` to execute on the given text.
|
||||||
|
|
||||||
|
The text is replaced with the result from the command - `Sat Jul 12 23:16:29 BST 2025`.
|
||||||
|
|
||||||
|
This also works for other commands, such as typing `1+2+3` and running `:.!bc` will return 6.
|
Loading…
Add table
Add a link
Reference in a new issue