Launching Vim via Lua
Posted
by Keith Pimmel
on Stack Overflow
See other posts from Stack Overflow
or by Keith Pimmel
Published on 2010-04-28T19:29:02Z
Indexed on
2010/04/28
23:57 UTC
Read the original article
Hit count: 358
I'm writing a simple little Lua commandline app that will build a static website. I'm storing my fragments in a sqlite database. Retrieving the data from the db is straightforward as is saving it; my question comes from editing the data.
Is there an elegant way to pipe the data from Lua to vim? Can vim edit a memory buffer and return it? I was planning on launching the editor via os.execute('vim') but only after grabbing a temporary file handle and dumping the database output into that. I would like to have to avoid touching the filesystem that way but that is my contingency plan.
© Stack Overflow or respective owner