Is it possible to invoke vim from another program to edit a block of text passed from that program and have vim return the edited text to the invoking program without writing it to a file?
I am writing a program in Go, the program's data is stored encrypted but the encryption method is AES not Blowfish or PK. The program can take care of AES encryption and decryption but I don't want the data stored unencrypted in any temporary/intermediary file.
I know vim supports Blowfish and PK encryption but not AES.
I know vim can read from STDIN (using
- in place of filename) but don't know of a way for vim to return data (other than by writing it to a file for the other program to read).
I know vim has some client-server modes but these don't seem to have the objective described above. They allow another program to pass in editing commands. I want interactive editing of text from/to a non-filesystem source.
I suspect this is possible but I haven't yet hit upon the right search terms to find any description of how to do this in vi.stackexchange.com in vim help or elsewhere.