UPDATE:The new version of slime.vim. The previous version is still available.
I started reading Practical Common Lisp yesterday. No discussion about Lisp can be complete without talking about Slime. Slime basically turns Emacs into an IDE for Lisp development. Peter Seibel thinks this is important enough to dedicate the second chapter to it. He even repackaged Lisp + Emacs + Slime as Lispbox to help people get started faster. For an excellent book (so far), available for free, and Lispbox, thank you Mr.Seibel.
After actually downloading, installing, and running Lispbox, I can see the advantages. Slime solves the problems you would have with any interactive REPL-type environment.
Let’s take Ruby’s irb as an example more people are going to relate to:
- you start irb
- you start a text editor (vim, textmate, emacs, …)
- you do a few tests in irb
- you copy and paste to a text editor
- you clean things up in the text editor
- you copy and paste back to irb
- you make a mistake
- you fix things up in the text editor
- you hesitate copying and pasting, because it’s painful now
- you write some tests
- you exit irb and run the tests to do your experiments
Let me present the dilemma another way: irb is great to get answers quick but it is also temporary because you know nothing you do in irb will be saved. However, the moment you start living in a text editor, you give up a lot of the power of REPL. Or, at least, your REPL becomes 10 seconds instead of 1 second. That changes the way you work. And that explains why Slime exists.
Slime creates a new interactive session with Lisp and you are able to copy and paste text from a text buffer to the session with one keyboard shortcut. That’s great! Now you can type, organize, pretty-print your code in a text editor, type C-c C-c to “refresh” the interactive session. This does not close and create a new session, the function definitions are reloaded into the current session. So, all your testing objects, those carefully crafted lists and hashes of objects (or whatnots) still exist—the world just changed around them.
Yeah, Slime is great. I’m just not an Emacs fan.
I did some research and Vim has no mode to support asynchronous sessions like Emacs. In essence, all that’s needed is a software that will spawn what you really want to run, say irb, control stdin/stdout/stderr, capture its own stdin/stdout/stderr and tunnel those to the child process. Also, it would be nice if it could open a port to receive external commands to be able to script stdin…
That’s when I remembered an article I read about scripting gnu-screen. To make a long story short, screen does everything we want, and more.
Here’s what we want to accomplish:
- start a named screen
- name the screen window
- start irb
- start another terminal
- start vim
- define a function/class/object
- have it “transported” to irb
Here are the instructions:
- screen -S session01
- C-a A—window01
- irb
- vim
- (type code)
- vip (select paragraph)
- “ry (copy to register r)
- :call system(“screen -S session01 -p window01 -X stuff ’” . @r . ”’”)
And BLAM, you just did some magic!
At this point, you are coming to 2 realizations:
- this is WAY cool
- you want this automated
Thankfully, I can help with the automation. Get slime.vim and put it in ~/.vim/plugin/ .
A few notes:
- the magic key is C-c C-c (like Slime, surprise!)
- the first time, you’ll be prompted for the “session name” and the “window name”
- subsequent times will be automated
- you can reprompt for “session name” and “window name” with C-c v
- by default, C-c C-c will select the current paragraph and copy-paste it
- but you can make your own selection first, and send it over with C-c C-c
…
As a final note, I’d like to drive the point that this can automate ANYTHING running in a screen:
- bash
- top
- irb
- python
- any lisp/scheme REPL
- mysql
- …
One thing is for sure, this will definitely change the way I work.
(For extra points, write your own Textmate plugin … this hack is not limited to Vim!!)
Couldn’t imagine how would a better writer of skill would write.
Awesome. I’ll try it out.
Not work for my environment (vim in Cygwin in Vista); it says “Command terminated”. Please help.
I neither use Cygwin nor Vista, sorry.
You could try to make it work outside of Vim, directly on the command-line. Using 2 terminals and screen, the “stuff” command of screen will let you script a session externally.
You can refer to the article I mentioned (http://www.jerri.de/blog/archives/2006/05/02/scripting_screen_for_fun_and_profit/) for more details.
Thanks for your reply.
Yes, it works outside Vim.
% screen -p 2 -X stuff ‘(+ 1 2)^M’
But not inside Vim!
:echo system(“screen -p 2 -X stuff ‘(+ 1 2)^M'”)
It says: Command terminated
By the way, this works in Vim (under Cygwin):
!screen -p 2 -X stuff ‘(+ 1 2)^M’
But the problem is that the result is not show in Vim status bar. So I must split Screen and use this instead in function Send_to_Screen(text):
silent exe ‘!screen ‘ . b:screen . ‘ -X stuff “‘ . substitute(escape(a:text, ‘”\’), ‘[\r\n]’, ‘\r’, ‘g’) . ‘”‘ | redraw!
By the way, “screen -X” do not print any output, unlike for example “ls -l”, so I wonder why ‘echo system(“screen …”)’ shows the result (of another screen) in Vim status bar???
Amazing! This is awesome. Thank you!
Hey I modified the script so that it is now fully automated when there’s only one Screen session attached. Should run on any UNIX system. Here it is:
let g:screen_sessionname = “”
let g:screen_windowname = “”
“”””””””””””””””””””””””””””””””””””””””””””””””””””””””””””
function Send_to_Screen(text)
echo system(“screen” . g:screen_sessionname . g:screen_windowname . ” -X stuff ‘” . a:text . “‘”)
endfunction
function Screen_Vars()
let g:screen_sessionname = “”
let g:screen_windowname = “”
” automatically find the session name if there’s only one
if system(“screen -ls | awk ‘/Attached/ {print $1}’ | wc -l”) == 1
let g:screen_sessionname = ” -S ” . system(“screen -ls | awk ‘/Attached/ {printf \”%s\”, $1}'”)
else
let g:screen_sessionname = ” -S ” . input(“Screen session: “, g:screen_sessionname)
endif
let g:screen_windowname = ” -p ” . input(“Screen window: “, g:screen_windowname)
endfunction
“”””””””””””””””””””””””””””””””””””””””””””””””””””””””””””
vmap “ry:call Send_to_Screen(@r)
nmap vip
nmap v :call Screen_Vars()
Excellent!
I tried your modifications and generalized the idea: provide a list of session names for completion. I overwrote the previous version above.
If there’s only one session name, you press TAB and you’re done.
I also changed the window name to 0 … because there will always be a window named 0. It seems like a better default value.
(I realize my changes don’t automate the case for 1 session name, however)
I discovered bug. The script fails on text region containing single quotes (e.g. Common Lisp sharp quote macro #’). Use a escaped double quote solves.
oh looks like you solve that in the newer version as well lol
So… it works, or not?
If not, can you show me an example where it fails? I tried to reproduce but it worked for me.
Sick,
I have been looking something like this for this for a while!
Thanks,
Courtney
[…] Like Slime, for Vim Scripting screen for fun and […]
Hey all,
If you only want to code Lisp in Vim, I’d advice you to have a look at my plugin, Limp, which does this and then some more.
It’s available at http://mikael.jansson.be/hacking/limp — I hope you find it useful! I’m always open for suggestions.
Thanks!
— Mikael
I agree with the other comments, this is a great addition to Vim which will definitely make my life easier. Would you consider posting your plugin to vim.org? Thanks a lot for sharing this great script.
[…] Like Slime, for Vim – Turn Vim into an IDE for almost anything using GNU screen… […]
[…] Jonathon Palardy’s suggestion I’ve added a ‘Send to Screen’ command (ctrl-alt-c) that copies selected text (or […]
Extra points claimed with this Screen Textmate Bundle.
Just wanted to add another tip/request:
If you do this: C-a Shift-S you get screen to split the shell. Press C-a TAB then C-a C-a until you get vim on top and irb in the lower shell… voila! You now don’t need C-a C-a EVER again :D instant results.
Can it be implemented within the plugin? Something like to start a screen session automatically if not started, then start 2 shells then put vim in one and leave the second one alone (or start irb there). is this a good idea?
Hi there,
I don’t see why this couldn’t be implemented in the plugin. However, I must say that I usually run the destination screen on another terminal, so I never go back and forth.
[…] Like Slime for Vim is a solution that relies almost solely on GNU Screen. No Hyperspec lookup or function completion without additional work, though. […]
Jonathan,
This is just brilliant!
Hmm. I get an error (using vim7.1)
Error detected while processing function Send_to_Screen:
line 5:
E484: Can’t open file /var/tmp/v916421/2
Any known solutions?
(the v916421 directory is empty)
does it work outside VIM (using the “stuff” command)?
refer to the comments above.
[…] big thing? Screencast: Like Slime, for Vim October 17, 2008 A year ago, I posted Like Slime, for Vim. There was a lot of interest in sticking with Vim but having a way to get something similar to […]
[…] just found this very nice blog article(https://technotales.wordpress.com/2007/10/03/like-slime-for-vim/) which describes howto controll a ruby-repl inside a screen window, which is a perfect solution for a […]
[…] emacs. I looked for alternatives that would let me stick with my beloved vi. While many were rather clever, they never came close to the full functionality that Slime […]
[…] How to replicate SLIME in vim […]
You have typo’d Peter Seibel’s surname.
@Wodin: thanks! fixed.
Hi, you can use buffer’s local variables (b:screen_sessionname) instead of global variables (g:screen_sessionname). In this way one can have many vim’s tab pages working with different interpreters.
Saludos!
@Jose: good point … I’ll patch that.
Hey!
Thanks. I just got this thing working with Python.
Best!
[…] Clarke que en no es posible distiguir una tecnología suficientemente avanzada de la magia. Esto es magia. (Y como feria, más […]
I just started using this and I wanted to thank you. It’s awesome and I have another reason to love screen.
Cheers!
Hi, I made a vim plugin using this ideas, it’s name is Vicle. It use vim to edit commands that are sent to the Screen session and save and history of that commands. It is simple but helps a lot :-)
http://www.vim.org/scripts/script.php?script_id=2551
Saludos.
[…] big thanx goes to technotales for explanation of REPL-modes for vim, and Renick for ponting me to REPL, and of course the […]
Jonathan,
This is crazy wild; great job! The only suggestion I would make is that some might change the keystroke mappings since Control-C is used by Vim to revert from insert mode to command mode. I realize it is my bad habit, but there are times when I will tap Control-C multiple times in my PHP / Java programming and I worry that it will fire off especially if I am not in screen.
Anyhow, this is great; I definitely want to post a link on my blog and get my cubemates using this!
A-
[…] [upmod] [downmod] Like Slime, for Vim « Jonathan’s Techno-tales (technotales.wordpress.com) 3 points posted 7 months, 3 weeks ago by jeethu tags python screen […]
Just came across this the other day, and must say thanks…this is great! Only thing from having me rip through Lisp (or at least, attempt to) was stumbling through Emacs when I’ve always been a VIMer. Much appreciated!
This is awsome! I actually learn Ruby right now and was looking for some kind of SLIME functionality in vim :) this works just great!
thanks a lot!
[…] https://technotales.wordpress.com/2007/10/03/like-slime-for-vim/ […]
Hey, check out screen.vim. It is much more comprehensive. It can spawn a new terminal by itself and do other nifty things:
http://www.vim.org/scripts/script.php?script_id=2711
When I try this using a Mac OS X terminal window, after sending code from Vim to the screen I get this output in the screen:
-X: stuff: display or window required
Any idea what is going on? Maybe this doesn’t work with Mac Terminal windows.
Have you tried using the commands directly from the command-line?
I would have to see more details to help.
#but you can make your own selection first, and send it over with C-c C-c
Can you elaborate on how to selection multiple lines to send over to the other screen? I tried the keys
vip
Ctr c Ctr c
but that does not seem to work with the complaint of X: stuff: one or two arguments required.
Thanks
Are you able to do it from the command-line?
Maybe watching the screencast will point to something that was not clear: https://technotales.wordpress.com/2008/10/17/screencast-like-slime-for-vim/
Thanks for your reply. Probably it is better that I rephrase the question I have. If I like to select the whole class or function to the python shell at once, how do I accomplish that in a step by step manner? I can select the text with the key: vip, but I can’t seem to find the way to send the selected files over to the shell. Right now, I have to select line by line which is very inconvenient at best. Thanks for your help.
Not sure what to say …
I tried it and it worked. I typed a paragraph, selected it and type Ctrl-C, Ctrl-C and (after I was prompt for the screen session and window) it got sent over to the screen.
You can look in the plugin, it’s a 32-line file. If you find anything, let me know.
Jonathan,
Thank you for your reply. Really appreciate your help. I look at the error again and I see that it is actually working but the spaces does not get sent over correctly. And there I get the IndentationError: unexpected indent. I am sorry for the confusion as I am stepping up my coding in Python. I hope you don’t mind I ask if there is anything that I have to set to be able to do get the screen to get the spaces over correctly? Thanks for your help.
Watt Poosanguansit
Hey, this works great! Just what I need and yet it’s so simple. I just changed three things: If you always use the same name for your screen session and window, you can hardcode it into slime.vim.
Another more substantial thing: I noticed with python that it doesn’t work as expected since python will faithfully accept the input but then wait for more. Since its based on indent it will not notice that the input is over. Here is an easy fix: just add a trailing new line like this:
nmap vip”ry :call Send_to_Screen(@r.”\n”)
I believe that will help all python users and not hurt anybody else. There is also another feature that might come in handy — execute the one line of text under the cursor:
nmap V
that should be
C-c C-c vip”ry :call Send_to_Screen(@r.”\n”) CR
and
C-x C-x V C-c C-c
just image in the “>” and “<"
another thing that annoyed me: after using C-c C-c it will always jump to the position on top of the block that was just executed instead of going back to where the cursor orignally was.
Thus I might some more minor changes and put the thing here:
http://n.ethz.ch/~hroest/download/slime.vim
oh, man, this rules. thanks.
Awesome awesome awesome. I am a novice Vim user, but appreciating its power. I remember using EMACS and enjoying its built in interpreter, and wishing for an equivalent in VIM. This solves everything!
Also great stuff on the screencasts, including the “Taking control of the command-line”.
[…] Palardy had an awesome idea. I took it, put my own slight spin on it, and created this: ?View Code VIM1 nmap <F5> […]
I use the VimClojure plugin for hacking clojure code in Vim, and it works pretty well. You get true slime like functionality too, including a variety of macro expansion and in-buffer expression evaluation features. Definitely worth it. Oh, and Clojure is about 1000 times cooler than Common Lisp, especially if you are interested in concurrency and lazy sequences.
http://kotka.de/projects/clojure/vimclojure.html
I’ve seen this hack elsewhere before…
but I hope you realize this isn’t ALL that slime does.
It integrates fully with Emacs. So when you “C-c C-c” you’re actually calling a function to send the form previous to where your cursor is to the Lisp REPL which compiles it. If there are errors during compilation, the relevant forms will be highlighted in a color-appropriate manner (warnings will be yellow, fatal errors red, etc). You then get a couple of keybindings to jump from error to error and get the exception text in the mini-buffer.
Or you can jump right into the stack-frames and interact with the debugger… all while still in emacs.
It’s a two-way bridge essentially.
[…] Like Slime, for Vim […]
Hello,
I made the following script for launching an interactive environment automatically:
http://greynode.org/iscala
I sort of tied it to scala, but the general idea could be applied to any language. It’s also still very rough, I haven’t even published the work on my blog yet.
–Jeff Aigner
[…] key (for me) to editing Clojure code in Vim is a combination of two plugins, VimClojure and slime.vim (see associated blog post). One of the difficult things is that slime.vim doesn’t actually […]
[…] Like Slime, for Vim « Jonathan’s Techno-tales – March 21st %(postalicious-tags)( tags: screen slime vim programming lisp ide shell ruby python )% […]
Guess the party is already over. But still hoping that someone would be able to help me out.
This slime.vim breaks for python repl. Python repl ends the function definition when it sees a blank line. If I am sending the whole function to the repl, it doesn’t work.
def foo():
bar = {}
# Empty line here breaks it. The REPL terminates the function at the empty line. This next line gives indentation error
while True:
pass
I tried adding this to Send_to_Screen function to clear out the empty lines from the input before sending to repl.
let text = substitute(a:text, ‘^\s*\n’, ”, ‘g’)
Of course it doesn’t work. I couldn’t find anything in the vim scripting documentation which can help me achieve the above.
http://vimdoc.sourceforge.net/htmldoc/usr_41.html
Does someone know how do I delete empty lines from text?
I was experimenting with:
:echo substitute(“lorem\n\n\nipsum”, “\n\n*”, “\n”, “g”)
It seems go get rid of empty lines (given they contain no space). Also, I wish I could get the + to work, but \n\n* will, essentially, give the same result.
Keep in mind that slime.vim sends your data to a command. As such, you could make a proxy command that takes the same argument, cleans up the text, and forwards it to screen. At that point, there’s no limit to what you can do.
Hey,
Thanks for the prompt reply and the tip. Based on your tip, I modified it for Python.
function Send_to_Screen(text)
if !exists(“g:screen_sessionname”) || !exists(“g:screen_windowname”)
call Screen_Vars()
end
let s:foo_text = substitute(a:text, ‘\n\s*\n\+’, ‘\n’, ‘g’) . “\n”
silent exe ‘!screen -S ‘ . g:screen_sessionname . ‘ -p ‘ . g:screen_windowname . ‘ -X stuff “‘ . substitute(escape(s:foo_text, ‘”\%#’), ‘[\r\n]’, ‘\r’, ‘g’) . ‘”‘ | redraw!
endfunction
I have posted the cygwin version here(formatting would be screwed; haven’t figured out how to post code).
I made following minor changes:
1) The expression is ‘\n\s*\n\+’. It deletes only vacant lines and accounts for spaces.
2) I am appending a newline at the end of register. Python repl needs it for completing declaration.
This vacant line breaking the repl is an issue only with Python whose syntax is based on structure and the repl takes the newline as end of function definition. Ruby, Lisp et al. has explicit end markers.
Hi,
The link to the script seems to be down. There’s a (seemingly older, as it doesn’t ask for details for the first C-c C-c) version in http://github.com/lmarburger/config_files/raw/master/vim/plugin/slime.vim but it would be great if you could reupload it.
Works for me. Here’s the link again: http://s3.amazonaws.com/mps/slime.vim
Also on my github: http://github.com/jpalardy/dotfiles/blob/master/vim/plugin/slime.vim
Nice work, thanks.
I have the same problem as bOR_, vim reports “can’t open /tmp/vxxxxxx/1”. I haven’t come across this before.
I run Slackware 13.0 and vim 7.2.
Nick
Please use gem “interactive_editor”. Allows you to use vim from inside irb.
Screen_Vars has a nice place to set default values for the session and window names, but the prompt does not currently auto-populate session name field. May I suggest that you you use g:screen_sessionname, rather than a hard-coded empty string, in the call to input()?
let g:screen_sessionname = input(“session name: “, g:screen_sessionname, “custom,Screen_Session_Names”)
@Mark Volkmann: That symptom happens if the target screen session does not have a window with the given name.
Is it possible to have syntax highlighting on screen output, too?
Vim sends a string to the receiver (screen output), it would, consequently, be the responsibility of the receiver to interpret the string and perform highlighting.
Depending on what you’re trying to do, you can extract Vim’s syntax highlighting: https://technotales.wordpress.com/2007/08/11/code-syntax-highlighting-for-blogs-with-vim/
[…] Palardy写了一个小插件叫做Slime.vim ,让Vim简单地与一个屏幕会话(screen […]
[…] Palardy写了一个小插件叫做Slime.vim ,让Vim简单地与一个屏幕会话(screen […]
Hi,
I’ve been trying this in windows XP using cygwin and I can’t quite get it to work. I think is a permission thing or a path problem. I What I’m getting is an error “E484: Can’t open file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\VIo316.tmp”
note that I’m able to send a command like in the example from one screen to the other. I just can’t do it in vim. Also how do you get the ^M? I have to literally send the enter command by pressing the Enter key before closing the quote.
Good people,
This hint gave me a leg up on getting vim integrated with my SBCL repl. Thanks for that!
I noticed, however, that -X has a limit. The GNU screen guys say that you should not paste “large” text buffers with it. Apparently, a couple of my functions qualify as “large.”
So, here’s a really primitive workaround in slime.vim.
Instead of using -X and pasting the buffer directly into the session, place it in a temp file and then have screen paste the temp file into the repl.
Instead of something like:
echo system(“screen -S ” . g:screen_sessionname . ” -p ” . g:screen_windowname . ” -X stuff ‘” . substitute(a:text, “‘”, “‘\\\\””, ‘g’) . “‘”)
use:
echo system(“echo ‘”. substitute(a:text, “‘”, “‘\\\\””, ‘g’) . “‘ > /tmp/scr-buf”)
echo system(“screen -S ” . g:screen_sessionname . ” -p ” . g:screen_windowname . ” -X readreg a /tmp/scr-buf”)
echo system(“screen -S ” . g:screen_sessionname . ” -p ” . g:screen_windowname . ” -X paste a”)
I haven’t found a limit to the length of what can be stored/retrieved in this manner, but it definitely works for screen-length functions.
Interesting.
That’s pushing the limit of what I’ve tried to do with this plugin :-)
Aw, this was a very nice post. In thought I want to put in writing like this moreover – taking time and precise effort to make an excellent article… but what can I say… I procrastinate alot and by no means seem to get something done.
[…] a common thread, I found this post, and it was awesome. After working out a few issues I’ve got vim piping python code (or […]
Cool!!! Thanks a lot!
I hit the “E484: Can’t open file” error on Ubuntu 10.10 and found a fix via this page:
http://superuser.com/questions/179164/vim-complains-about-a-temporary-file-when-opening-syntax-highlighted-files-on-mac
Either put “set shell=/bin/bash” in your vimrc, or if you have a custom shell value, put “set shell=/bin/bash” as the first line of the Send_to_Screen function.
Thanks so much! I think I have discovered the missing piece of my Clojure dev environment finally. I’m going to evangelize slime.vim for you.
Simple and robust. Saved my life. Thank you!
[…] read this post, which explains, how to set up a screen in some unix terminal and then send some text over the […]
Is there an undisclosed advantage to using the substitute(a:text, “‘”, “‘\\\\””, ‘g’) in the face of shellescape(a:text) ?
[…] I am somehow using sreen for a long time. Except traditional usage like window multiplexer for one terminal or process deatacher, I used it for making Vim a CLI IDE for Python, SQL, or what so ever language using CLI. See Slime plugin […]
I find your plugin to be the best because it is so versatile. It works for ANY lisp – including racket, which I prefer.
I request permission to copy the entire wording of this blog post as it stands in a text file as documentation, including the date and the author. Let me know if I may do so. Thanks.
Sure thing.
Just put up at link to this article.
And possibly the github page: https://github.com/jpalardy/vim-slime
Consider to use the vim-r-plugin to interact with repl-language
see note in wishlist: http://vim.wikia.com/wiki/Script:2628
The git-repository is available via:
https://github.com/jcfaria/Vim-R-plugin
This is useful, thanks very much … !
I’m currently re-evauluating Vim as my default editor for choice. I actually started using Vim, but never really became a “power user”; I then moved on to Kate (I still love its Regex composer–which is available separate from Kate, by the way), and then moved on to Emacs as I started to try to learn Lisp.
I kindof like Emacs, but I’m by no means a “power user” of that, either. And now, I’m again beginning to be attracted to the power and simplicity of Vim. Reading about this gives me something to look forward to!
Perhaps “SLIME” should be re-acronymed to “Superior Language Interaction Mode for Everything”. :-)
Also, you were going to award extra bonus points for anyone who does this with TextMate. How many bonus points will someone get, if they do this with Emacs? (What really blows my mind is, that it probably will work, and may even be simpler to set up than SLIME itself. While one commenter pointed out that SLIME provides more than just instant compilation, I would point out that this sounds simpler to set up, and is probably more versatile, than Emacs + SLIME…)
[…] Ayrıca yazının başında da söylediğim gibi vim’den konsola satırları seçip konsola göndermenin yolunu da buldum. Yine screen programı ve bir vim plugini ile bunu yapabiliyorsunuz. Nasıl yapıldığını anlatan yazı şurada : Link […]
[…] Palardy has written a little Vim plugin called Slime.vim that lets Vim easily communicate with a screen session, probably one running a REPL for some […]
I really like it whenever people come together and
share ideas. Great blog, stick with it!
After exploring a handful of the articles on your web site, I seriously
appreciate your way of blogging. I book-marked it to my bookmark website list and will be checking back soon.
Please check out my website too and let me know your
opinion.
Hello, Neat post. There’s an issue together with your site in internet explorer, would check this? IE nonetheless is the marketplace leader and a large portion of other people will pass over your excellent writing due to this problem.
I’m not trying to snob IE — the layout comes from wordpress.com.
If you would like to obtain a good deal from this article then you have to apply such strategies to your won website.
[…] for a Vim version. What I found was vim-slime by Jonathan Palardy which was originally introduced here. Vim-slime relies on the GNU screen command for the heavy lifting, I’m not too familiar with […]
[…] Vim and Screen. Screen supports bursting into "windows" identical to Vim's. See here for an instance of even tighter Vim+Screen […]
Thank you for the good writeup. It in truth was once a enjoyment account it.
Look complicated to far added agreeable from you!
By the way, how could we keep up a correspondence?
[…] Vim and Screen. Screen supports bursting into "windows" identical to Vim's. See here for an instance of even tighter Vim+Screen […]
[…] vim-slime is absolutely great, it’s a plugin for vim that lets you send text to screen or tmux. This is perfect for programming any language that has an REPL, simply load a session up in a tmux, open up vim, tell it what tmux window and session you want to send text to and away you go. This will work for any language! A great post can be found here. […]
I found a way to do this on Windows using ConEMU:
system(shellescape(“C:\\Program Files\\ConEmu\\ConEmu\\ConEmuC64.exe” /GuiMacro:0 print: sometextgoeshere
will send ‘sometextgoeshere’ to the first ConEMU console window :)
[…] vim-slime is absolutely great, it’s a plugin for vim that lets you send text to screen or tmux. This is perfect for programming any language that has an REPL, simply load a session up in a tmux, open up vim, tell it what tmux window and session you want to send text to and away you go. This will work for any language! A great post can be found here. […]
[…] https://technotales.wordpress.com/2007/10/03/like-slime-for-vim/ […]