CLI tool
cknadler/vim-anywhere avatar
cknadler/vim-anywhere

vim-anywhere: Open a Vim Buffer Anywhere, Paste the Result

Use Vim everywhere you've always wanted to

3,771 stars146 forksShellMIT

At a glance

What is it?
vim-anywhere is a macOS and Linux launcher that opens a temporary Vim buffer from any application, copies the buffer to the clipboard on exit, and refocuses the app you came from. It suits people who already live in Vim and want it for prose, not just code.
Who is it for?
Adopt vim-anywhere if you already use Vim daily and write prose in browsers, chat clients or issue trackers on macOS or a Gnome-based Linux desktop, and you accept MacVim or gVim as a dependency plus a manual keybinding step. Skip it if you are on Windows, on a non-Gnome Linux desktop without custom keybinding support, or if a system-wide clipboard editor is not something you want running from a shell script.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 6 months ago.
What is it written in?
Mainly Shell, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • cknadler/vim-anywhere3,771 ★ · +2
Star history
Repository2026-09-242026-11-14
cknadler/vim-anywhere3.8k3.8k

2 Stars in the last 51 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The friction vim-anywhere removes, and who feels it

The README frames the problem in one line: sometimes you edit text outside of Vim, and "these are sad times." That is the whole pitch. The author describes a workflow of opening a terminal, writing in Vim, copying the buffer out, and pasting into whatever application was in front a moment ago. vim-anywhere automates that loop rather than trying to make other applications modal.

It is aimed at a narrow reader. You need to already be comfortable in a real Vim instance, not a keybinding layer inside another editor. You need a desktop where a global shortcut can launch a shell script. And you need to care about the difference between writing in Vim and writing in a textarea. If you only edit code and your editor is already Vim, this project adds nothing. The audience is people who write prose, tickets, chat messages or documentation in applications that will never have Vim motions.

How the invocation, clipboard and refocus cycle works

The mechanism is deliberately thin. The README states that once invoked, vim-anywhere opens a buffer; when you close it, the contents are copied to your clipboard and your previous application is refocused. So the data flow is: global keybinding fires, a script runs, an editor process attached to a temporary file appears, you edit and quit, the file contents are read back and placed on the clipboard, and focus returns to the window you left.

The history behaviour is the most interesting implementation detail the README exposes. Each invocation creates a temporary file, in `$TMPDIR/vim-anywhere` on macOS or `/tmp/vim-anywhere` on Linux, and those files persist until the system restarts. That is a deliberate design choice with a real consequence: your drafts are recoverable for the life of the boot session, but they are also sitting in a world-readable temporary directory. On a shared machine, that matters. The README does not document any cleanup, permissions hardening or redaction step, and it does not describe an option to disable the history.

Installing vim-anywhere and binding your first shortcut

The README gives a single install command that pipes a remote script into bash. It targets macOS and Linux with different editor requirements: MacVim on macOS, installed via Homebrew cask, and Gnome plus gVim on Linux.

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

After that, the project places its files under `~/.vim-anywhere`, including `update` and `uninstall` scripts. The keybinding is not set automatically on macOS. The README points to System Settings and gives the exact path:

code
System Settings > Keyboard > Keyboard Shortcuts > Services > Vim Anywhere

The default macOS shortcut is `ctrl+cmd+v`. On Linux the default is `ctrl+alt+v`, and Gnome users set it through gsettings:

bash
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/vim-anywhere/ binding '<Primary><Alt>v'

i3wm users get a one-liner that appends a bindsym to the config and calls the launcher directly:

bash
echo 'bindsym $mod+Alt+v exec ~/.vim-anywhere/bin/run' >> ~/.i3/config

After any of these, reload your window manager config and press the shortcut. If it works, a Vim window appears; write something, quit with `:wq`, and the text should land on your clipboard with the previous window back in focus.

Where vim-anywhere stops being the right tool

The platform boundary is the first limitation. The README documents macOS and Linux only. Windows is not covered, despite being a common search term around this project, and there is no stated plan for it. If your work happens on Windows, this is not a tool you can adopt.

The Linux requirement is tighter than it first looks. The README lists Gnome or a derivative as a requirement, and the keybinding instructions are written for Gnome and i3wm specifically. Other desktop environments are not addressed, so the global shortcut step is on you.

The refocus behaviour is the second soft spot. The README asserts that your previous application is refocused, but it does not describe how that is achieved or what happens when it fails. Window focus is exactly the kind of thing that varies by compositor and desktop version. If refocus silently breaks, you end up with a Vim window and a clipboard you have to paste manually, which is most of the friction the project exists to remove.

Finally, there is no release history. The repository has no published releases, so updates arrive through the `~/.vim-anywhere/update` script and whatever the master branch contains. There is no version number to pin and no changelog to read before updating.

vim-anywhere versus an editor keybinding layer

The obvious alternative is a Vim emulation layer inside the application you are already using, or a browser extension that adds Vim motions to text fields. The difference in approach is fundamental. A keybinding layer reimplements a subset of Vim inside a host application, so it depends on that host exposing the right hooks and it inherits the host's limitations for things like registers, macros, ex commands and plugins. vim-anywhere does the opposite: it does not emulate anything, it launches the real editor and moves text through the system clipboard.

That trade is worth stating plainly. You get the full Vim you already configured, including your plugins and mappings, at the cost of a window switch and a clipboard round trip. A keybinding layer keeps you in place but gives you a fraction of Vim. If your editing needs are simple motions and a couple of operators, the emulation layer is less disruptive. If you want your actual `~/.vimrc`, vim-anywhere is the only one of the two that can give it to you.

Maintenance, updates and the MIT licence

The repository is not archived, and the last push was on 2026-05-02. That is roughly four and a half months before the time of writing, which is recent enough that the project is not abandoned, but the README does not describe a release process and the repository has no published releases, so there is no tagged version to reason about.

Upgrades go through the project's own script:

bash
~/.vim-anywhere/update

Because there is no version pinning described, an update pulls whatever the master branch holds at that moment. If you install this on a machine you depend on, that is the operational cost: you are tracking a branch, not a release. Removal is equally scripted, via `~/.vim-anywhere/uninstall`.

The licence is MIT, which is permissive and places few obligations on you beyond retaining the copyright notice and permission text when you redistribute the code. That is a statement about the licence text, not legal advice; if you plan to vendor the scripts into a commercial product, read the LICENSE file yourself and talk to someone qualified if the answer matters.

Editorial conclusion

Adopt vim-anywhere if you already use Vim daily and write prose in browsers, chat clients or issue trackers on macOS or a Gnome-based Linux desktop, and you accept MacVim or gVim as a dependency plus a manual keybinding step. Skip it if you are on Windows, on a non-Gnome Linux desktop without custom keybinding support, or if a system-wide clipboard editor is not something you want running from a shell script. Before relying on it, verify three things on your own machine: that the install script completes and puts the launcher at ~/.vim-anywhere/bin/run, that your chosen keybinding actually fires, and that closing the buffer really places the text on your clipboard and refocuses the previous application, because that refocus step is the part most likely to behave differently across desktop environments.

Frequently asked questions

Which platforms does vim-anywhere support?

The README documents macOS and Linux. macOS requires MacVim, installed with the Homebrew cask, and Linux requires Gnome or a derivative plus gVim. Windows is not covered.

How do I install vim-anywhere?

The README gives a single command that pipes a remote install script into bash: curl -fsSL https://raw.github.com/cknadler/vim-anywhere/master/install | bash. It places the project under ~/.vim-anywhere.

Where does vim-anywhere keep the temporary files it creates?

The README states that each invocation creates a temporary file in $TMPDIR/vim-anywhere on macOS or /tmp/vim-anywhere on Linux, and those files remain until the system restarts.

How do I change the shortcut that opens the Vim buffer?

On macOS the default is ctrl+cmd+v and it is changed under System Settings, Keyboard, Keyboard Shortcuts, Services, Vim Anywhere. On Linux the default is ctrl+alt+v and it is set with a gsettings command or, on i3wm, a bindsym line in ~/.i3/config.

How do I update or remove vim-anywhere?

The README documents an update script at ~/.vim-anywhere/update and an uninstall script at ~/.vim-anywhere/uninstall. The repository has no published GitHub releases, so the update script follows the master branch.

Official sources

  1. cknadler/vim-anywhere on GitHub
  2. Issues
  3. License: MIT
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/cknadler-vim-anywhere.svg)](https://hysenlabs.com/projects/cknadler-vim-anywhere)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/cknadler-vim-anywhere.svg)](https://hysenlabs.com/projects/cknadler-vim-anywhere)

Was this useful?