#SingleInstance Force
#Enter::
SendInput mr^a ;mark current spot in register r and select all
Sleep 20
SendInput ^c{Esc}``r ;copy, stop selection, return to spot
;if we have a REPL already, use it. otherwise start a new one
IfWinExist, Arc REPL
WinActivate, Arc REPL
else
start_arc()
MouseClick Right, 50, 50 ;open context menu
SendInput p ;p for paste
exit
start_arc()
{
Run cmd /k cd "c:\\documents and settings\\blahblah\\desktop\\arc2"
Sleep 100 ;wait for the cmd window to show before typing
SendInput mzscheme -m -f "c:/documents and settings/blahblah/desktop/arc2/as.scm"{Enter}
Sleep 200 ;wait for title to change
IfWinExist, C:\WINDOWS\system32\cmd.exe - mzscheme
WinSetTitle Arc REPL
}
it's pretty simple. as you can see, it's for Arc, and it's setting a script to windows key + Enter. if you're editing some code in Vim, hit the hot key (when you're in command mode) and the script will ctrl+a -> ctrl+c the code in Vim and right-click paste it in the REPL. if there isn't a REPL open it will first open one and then paste it
you can make modifications such as only running what you have selected (would work well with visual modes,) only running the current paragraph (using the parentheses commands in Vim,) running what you have copied (i.e. Run-from-clipboard) and so on and so forth. you can also have a little window pop up where you can type some code and have it execute etc etc