Created
December 16, 2018 21:48
-
-
Save JeffCarpenter/3bca44c789b649be3194668996744c86 to your computer and use it in GitHub Desktop.
PyVipe: Launch Pyvim to Edit a String from Python Code at Runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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