Live data from Hacker News

EditREPL - Open Vim from within the Python REPL

philipbjorge.github.com

1–10 of 18 posts

Re: EditREPL - Open Vim from within the Python REPL

#3
post #2

I could be mistaken, but isn't this a GNU Readline feature? Neat regardless.

I think this is different because I'm full on opening an instance of vim. (I didn't know about GNU Readline though and it looks awesome - I'll definitely try and work it into a project at some point).

Re: EditREPL - Open Vim from within the Python REPL

#7
post #2

I could be mistaken, but isn't this a GNU Readline feature? Neat regardless.

I think this is different because I'm full on opening an instance of vim. (I didn't know about GNU Readline though and it looks awesome - I'll definitely try and work it into a project at some point).

Either Readline let's you do the same, or that is just a bash specific feature I am miss remembering. I can check later when I'm not on my phone.

Re: EditREPL - Open Vim from within the Python REPL

#8
post #2

I could be mistaken, but isn't this a GNU Readline feature? Neat regardless.

I think this is different because I'm full on opening an instance of vim. (I didn't know about GNU Readline though and it looks awesome - I'll definitely try and work it into a project at some point).

I'm only using GNU readline for my bash prompt, but if I press v it spawns a full-on $EDITOR instance to edit the commandline.

Re: EditREPL - Open Vim from within the Python REPL

#10

Cool. Haven't looked at the code yet, but I wrote: https://github.com/Julian/dotfiles/blob/master/.config/pytho... which does something similar (and is interpreter agnostic as it looks like this is).

Mine's not interpreter agnostic because I had to mess with the stack frames to insert variables into the global context.

But yours is able to do that because your importing a top-level edit function while I was pretty set on dynamically creating a vim() method and not having to import a function (just a module).

I love how yours lists the globals though! I might just have to bite that feature :).

Post reply on HN