5 ms·
pg said that Mac lets him drag and drop code from vi to repl - and he was very happy about it you can do that on any OS with the GUI shell for Vim (with Vim ru
by tokipin 19y ago
pg said that Mac lets him drag and drop code from vi to repl - and he was very happy about it
you can do that on any OS with the GUI shell for Vim (with Vim running in Vi compatible mode if that matters) [edit]: actually it doesn't look like it's possible. i could have sworn it was though <.< my bad
i'm guessing the iPod has something to do with macs becoming more popular
- kirubakaran 19y agoI tried this now but it didn't work for me. I must be missing something. Please help. I am running GVIM (I am at work so I am on Windows). I am trying to drag and drop a block of code to Python REPL. It is not happening.
- ibgeek 19y agoUmmm... copy and paste?
- kirubakaran 19y agoMac supposedly allows you to drag&drop code without explicit copy&paste.
- ibgeek 19y agoThat may be true but that is such a minor thing. I use OS X and Linux... definitely not something that ever makes a difference.
- utx00 19y agoyou don't mind not having page-up/page-down keys?
- curi 19y agomacs do have page up and page down keys
- alex_c 19y agoReally? http://www.notebookreview.com/assets/15839.jpg http://www.notebookreview.com/assets/15839.jpg
- rksprst 19y agoYes really, look at the up and down arrow keys.
- utx00 19y agowhat i meant is a dedicated key that when pressed will trigger a page-up/page-down event. on the mac you have to press a modifier key to make it go. most of the time this is ok (and i don't really mind it whilst in emacs ctrl-v/meta-v are basically the same thing) except that you can press ctrl-pageup/down on firefox to toggle the tabs. on the mac you have to press ctrl-mod-pageup/down ... same goes for gnome-terminal. i don't feel like turning my fingers into a pretzel for no good reason.
- akkartik 19y agoYeah, not having home/end, pgup/dn, is a huge pain in the butt. I never realized how much I used them for navigating within textboxes. Especially in combination with shift and control. In general expect to spend a good amount of time reacclimatizing on keybindings when going from PC to mac worlds. I find myself constantly guessing what modifier (shift, fn, cmd, ctrl, alt) to replace in this keybinding to get it to work.
- spydez 19y agoCtrl-C, Ctrl-V isn't exactly the same thing as drag 'n' drop...
- ibgeek 19y agoOn my Macbook, my windows often always overlap because the resolution just isn't high enough to "stretch out." So, I find that dragging and dropping is actually more difficult due to having to switch windows.
- SwellJoe 19y agoSelect, middle mouse button click is copy and paste where I come from, and it's lack is the single most uncomfortable aspect of working in Windows or Mac OS X for me.
- tokipin 19y agooops. i thought i had done that some times. i'll see if i can come up with any useful mechanisms to compensate for lying
- tokipin 19y agoallright. i came up with something but 1) it only works on windows and 2) you need an extra app. it's a really really good app though the app is AutoHotkey: http://www.autohotkey.com/ http://www.autohotkey.com/ and the script is: #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
- kirubakaran 19y agoI do use AHK for other things but never used it for this purpose, so, Thanks! I do my coding in my Linux machine though.
- projectileboy 19y agoI can also do this in IntelliJ (using my Arc plugin).