Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call external program from vim with visual marked text as param?

Tags:

vim

Call pattern: path-to-programm visual-marked-text filetype directory

Example: "C:\Programme\WinGrep\grep32.exe" search-pattern *.sql D:\MyProject\build

like image 858
JAVH Avatar asked May 22 '26 12:05

JAVH


1 Answers

You select the text and then type:

:!<program>

For instance, to sort the lines, select them and type:

:!sort

Note that this will replace the marked text with the output of the external program

like image 53
Nathan Fellman Avatar answered May 25 '26 08:05

Nathan Fellman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!