I’m looking for a way to retrieve what has been entered in vim and load it in a ruby variable.
User type:
myProgram -m
Then Vim appears. Whenever the user quit Vim, “myProgram” retrieves the user’s input.
I tried doing something (naive)
message = `vim`
However, I get “Vim: Warning: Output is not to a terminal”
Thank you very much
When inside vim, you can run
:%!your_programand your_program will be invoked with the current buffer as it’s stdin.