I want to pipe the contents of the register with VIM.

Asked 2 years ago, Updated 2 years ago, 49 views

: Is there a way to pass the contents of the register instead of the buffer when using w!command?

vim

2022-09-30 21:33

1 Answers

You can configure the second argument of system() to pass standard input to the command.

:call system("my-command",@/)

In this example, the contents of the search register are written to the standard input of the command my-command.


2022-09-30 21:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.