Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know there are lots of cheat sheets for VIM out there, but I hate having to print out so many cheat sheets.

Is there a way I can pop-up a cheat sheet with a shortcut?

I am using GVIM on Windows, so I would prefer something pretty like this, but a text one would be fine too. I know VIM has a pretty extensive help system, but I haven't found anything that just lists common shortcuts quickly.

share|improve this question
up vote 1 down vote accepted

First, save the cheatsheet.gif somewhere on your computer.

On Windows (largely taken from 'How to easily open files and URLs from the [windows] command-line' and 'Execute external programs asynchronously under Windows'), you can use this ex command:

:!start cmd /c start C:\path\to\cheatsheet.gif

To turn this into a keymap, use something like:

:nnoremap <f5> :!start cmd /c start C:\path\to\cheatsheet.gif

To make it permanent, put that line in your vimrc (:e $MYVIMRC), but don't include the colon at the very start of the line.

On Linux:

:!xdg-open /path/to/cheatsheet.gif &
:nnoremap <f5> :!xdg-open /path/to/cheatsheet.gif &

I can't recall off the top of my head what the OSX command for 'open with default application' is, but the vim command would just replace xdg-open with whatever that is.

All of these just open cheatsheet.gif with the default program you have set up for GIF images. See :h ! and (for Windows) :h !start.

share|improve this answer

No need for an external cheatsheet:



:h quickref
share|improve this answer
While I much prefer having something internal, these are still too long to use for a quick reference. But great for when I'm working over ssh. – Dan Feb 4 '14 at 5:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .