4 ms·
Like Slime, for Vim
- NickM 17y agoOverall, great idea. However, it's kind of annoying to use with Python, since when you copy in a function definition, you need to go to the interpreter and hit enter an extra time to get it to work. I was going to try and fix this myself, but I'm not sure if there's any easy way to add a special case for this, since the Vim script has no way of knowing what kind of interpreter is running in the other screen session....
- sophacles 17y agoThis is cool, but kinda hacky... I mean what if I want to use the output for say, going to the error in the copied code? Does screen have a way to attach to stdin/stdout/stderr for a process it is running? While still displaying in the host terminal as well (something akin to tee)?
- paddy_m 17y agoIt is close, but I would have to say that the way emacs interacts with external processes is probably my favorite feature. It is simply a paradigm that no other text editor seems to even attempt. Here are some common modes that I use that interact with external processes. py-shell: kind of obvious, using the python shell is sometimes awkward because of the way that python doesn't reload code. pdb-mode:in any shell process, if my python code hits a pdb.set_trace() python will pop up a debugging repl. As I step through my code with pdb, emacs opens up whatever file the current stack is in to the position in the stack. I couldn't imagine debugging code without this. This functionality also exists for gdb and rdb I think, I don't use those frequently. compile-mode: when I run unit tests and I get an error, compile mode lets me click or hit return on that error and instantly jump to that code in another buffer shell: emacs deals with my bash shell. I can easily scroll up in the buffer to copy and paste output from previous commands. I can search backwards through not just commands I have previously run, but through previous output from the shell. When I open a file from the shell, it defaults to my current shell directory. sql-mode: gives all the goodness of emacs to an sql repl. I can edit sql in another buffer, craft the query I want, and send just that query to my sql repl.
- wooby 17y agoFor slime-like editing with vim for Clojure, check out VimClojure. It's really great.
- dkersten 17y agoI had trouble installing it, actually.. I couldn't seem to get the plugin to load the keybindings (LocalLeader never seemed to have got bound and the functions which were to get called werent defined..) :-( Its a pity, because VimClojure looks damned sweet. Thankfully I did get VimClojures syntax highlighting to work.
- zaphar 17y agoI had the same issue at first. I did get it fixed eventually but I can't remember what I did. :-( Once you get it running though it offers syntax completion send-to-repl and most of the slime functionality without the need for screen. Very worth the effort setting it up.
- nearestneighbor 17y agoDebugging is most of the SLIME functionality. Sending expressions to REPL is trivial and existed long before SLIME (ilisp).
- dkersten 17y agoYeah, the features looked very convenient and useful for interactive development, testing and debugging. I guess I'll have to give it another try.
- nearestneighbor 17y agoDoes debugging work in it?
- bokchoi 17y agoslimv is a more complete Vim+SLIME plugin that doesn't require screen: http://www.vim.org/scripts/script.php?script_id=2531 http://www.vim.org/scripts/script.php?script_id=2531 There is a Vim+screen plugin as well for interacting with shells: http://www.vim.org/scripts/script.php?script_id=2711 http://www.vim.org/scripts/script.php?script_id=2711
- zachbeane 17y agoLike slime, if you ignore autocompletion, arglist hints, automatic indentation of macros based on &body, M-. (jump to definition), crossreferencing, and compiler note overlays. But having C-c C-c is nice!
- swannodette 17y agoMy thoughts exactly. SLIME if anything is more of an Lisp IDE (and a superior one at that) not just a clever hook to a REPL.
- mahmud 17y agoand a superior one at that Slime is indeed a superior lisp interaction mode.
- l0stman 17y agoIndeed. This video is probably worth a thousand words. http://www.guba.com/watch/3000054867 http://www.guba.com/watch/3000054867
- sophacles 17y agoI think 1000 is a couple orders of magnitude too few. Thanks for the link.
- papaf 17y agoYeah, Slime is great. I’m just not an Emacs fan. I'm not an emacs fan either but I grudgingly use it everyday for R and Octave development. Vim is my preferred text editor but it can't compare to the power of emacs when working with interactive languages. Emacs viper mode is excellent though and gives access to the vi keys anywhere. I'd also recommend those that really hate emacs to try the console mode -- its much snappier and brings the monster closer to a vim-like experience.
- saurabh 17y agoWhat i think would rock would be reinteract like development environment inside Vim.
- asciilifeform 17y agoLike Steering Wheel, but for Brick! No car needed!
- zachbeane 17y agoThis also reminds me a bit of projects along the lines of "Like Lisp, for <some non-Lisp language>!" Yes, just like it, except missing most of the good parts.