The internal output of the vim command for an external application

Let's say that I run :set all inside vim in command mode, this command outputs a lot of things, as expected, how can I redirect this output to an external application capable of reading the incoming buffer, say gedit

+4
source share
1 answer

Using ViM: how to redirect the output of an ex command to the current buffer or file? , you can redirect the output directly to a file, and then open it using Gedit or any other selection editor, like any other file.

 :redir >your_file | silent set all | redir END 

Edit:
As romainl mentioned in the comments, you can also copy it directly to the system clipboard if Vim is compiled using +clipboard . Then you can simply paste it into another use of ctrl v , as usual.

 :redir @+ | silent set all | redir END 
+3
source

Source: https://habr.com/ru/post/1482702/


All Articles