Re:Vim Anywhere
by leephillips on Friday February 16, 2018 @03:29PM
(#16395817)
I like the idea, as I also want to write everything in Vim. But I (obviously) always have Vim running, and can get to it from anywhere with one keystroke. Once there, opening a buffer and copying its contents after writing stuff is just a few more keystrokes; so I don't see the need for this, at least for my setup--and I'm thinking that other hardcore Vim lovers have things set up similarly.
[ Parent
| on HN ]
> But I (obviously) always have Vim running, and can get to it from anywhere with one keystroke. Once there, opening a buffer and copying its contents after writing stuff is just a few more keystrokes …
As an emacs user, I just love seeing vim-users discover the utility of an always-there, complete text-editing environment. If only theirs had an extension language worth its salt …
Re:Vim Anywhere
by super_mario on Saturday February 17, 2018 @06:29AM
(#16400246)
You can write vim extensions in python, Perl, ruby, lua and of course viml.
And vim launches in milliseconds, so no need to keep it running in the background as some text editing server.
Re:Vim Anywhere
by leephillips on Saturday February 17, 2018 @08:10AM
(#16400514)
Both true, but since I'm always editing something, I have it open in server mode so I can send a file to it for editing from the terminal.
i3 and ratpoison are tiled window managers for Linux that make your whole computer behave like vim does. If you really are interested in simplifying the amount of work you do- you should consider abandoning the normal "stacked cluttered windows" paradigm in exchange for something that requires less pointless mouse work to achieve the same amount of work faster.
Most monitors have enough real estate to where alt-tabbing is not only unecessary, but counter productive and distracting. Its like using your foot to operate the gas pedal 100% of the time instead of using cruise control to drive hours in a straight line.
What system?
After writing to tmp, I pipe to pbcopy on Mac and pipe to xclip on Linux.
I do this enough that installing this might be worth it.
Re:Vim Anywhere
by leephillips on Friday February 16, 2018 @04:22PM
(#16396457)
Linux (ubuntu) using xfce. Always have one workspace devoted to a full-screen Vim window, so can get there with a keyboard shortcut. In my .vimrc, I have
set clipboard=unnamedplus
so that yanked text is copied to the X11 clipboard. Yank buffer, switch back to browser (or what have you), paste.
With Vimium, the whole procedure is mouseless.pbcopy on Mac brings back memories.
Re:Vim Anywhere
by mistahchris on Friday February 16, 2018 @03:35PM
(#16395870)
Agreed. This is a clever little hack that I never would have thought of. But I usually have a "temp" or "scratch" buffer running for this kind of thing anyways.
It is cool that apple has the ability to script like this though. It's pretty handy.