Skip to content

miroslavvidovic/vim-anywhere

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-anywhere

Sometimes, you edit text outside of Vim. These are sad times. Enter vim-anywhere!

demo

Once invoked, vim-anywhere will open a buffer. Close it and its contents are copied to your clipboard and your previous application is refocused.

Info

This is a fork of the original vim-anywhere optimised for Linux systems and simplified to remove possible bugs and issues.

Installation

Requirements

Linux:

  • Gnome (or a derivative)
  • gVim

Install

curl -fsSL https://raw.github.com/miroslavvidovic/vim-anywhere/master/install | bash

Update

~/.vim-anywhere/update

Uninstall

~/.vim-anywhere/uninstall

Keybinding

xbindkey append

"./.vim-anywhere/bin/run"
 control+alt + v

to your .xbindkeysrc

Gnome

$ gconftool -t str --set /desktop/gnome/keybindings/vim-anywhere/binding <custom binding>

I3WM

$ echo "bindsym $mod+Alt+v exec ~/.vim-anywhere/bin/run" >> ~/.i3/config # remember to reload your config after

Adjust in case $mod is not set to ctrl.

History

vim-anywhere creates a temporary file in /tmp/vim-anywhere when invoked. These files stick around until you restart your system, giving you a temporary history.

View your history:

$ ls /tmp/vim-anywhere

Reopen your most recent file:

$ vim $( ls /tmp/vim-anywhere | sort -r | head -n 1 )

Why?

I use Vim for almost everything. I wish I didn't have to say almost. My usual workflow is to open Vim, write, copy the text out of my current buffer and paste it into whatever application I was just using. vim-anywhere attempts to automate this process as much as possible, reducing the friction of using Vim to do more than just edit code.

Contributing

Love vim-anywhere? Hate it? Want to change it completely? Email me or open an issue and lets talk. Pull requests, suggestions and issues of any kind are welcome with open arms.

License

MIT.

About

Use Vim everywhere you've always wanted to

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 87.5%
  • AppleScript 12.5%