Skip to content

Instantly share code, notes, and snippets.

@JeffCarpenter
Created December 16, 2018 21:48
Show Gist options
  • Save JeffCarpenter/3bca44c789b649be3194668996744c86 to your computer and use it in GitHub Desktop.
Save JeffCarpenter/3bca44c789b649be3194668996744c86 to your computer and use it in GitHub Desktop.
PyVipe: Launch Pyvim to Edit a String from Python Code at Runtime
from pyvim.editor import Editor
def pyvipe(text):
e = Editor()
buf = e.window_arrangement._get_or_create_editor_buffer(text=text)
e.run()
return buf.buffer.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment