Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put [challenge ID]

Changelog (details)

Rules

  1. Anyone can create a new challenge
  2. Creator of the challenge is also the moderator: can view/delete solutions
  3. Players can submit as many attempts as they want per challenge
  4. Entries are ranked by score (lowest wins), ties broken by time
  5. VimGolf initializes your Vim with a custom .vimrc - no custom modifications
  6. No plugins, predefined macros, etc, are allowed - level playing field
  7. Refrain from copy/paste, reading in the solution (:read), or using external tools
  8. Cheaters will be publicly ridiculed by fellow golfers :-)

Note: We're definitely not trying to discourage Vim users from customizing their .vimrc's, defining useful macros or loading external plugins. Having said that, to have a fair competition, we need to level the playing field, and to do that, we're sticking to the basics.

FAQ

  1. How do I view the solutions? Submit your own to unlock them.
  2. Can I see all the solutions? You'll have to climb the ladder - practice makes perfect.
  3. I found a cheat entry! Ping one of the moderators on IRC or twitter!
  4. What about feature X? Check the Github link in the sidebar, or hop on IRC!

Resources for learning Vim

VimGolf's .vimrc

" http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc
set nocompatible " use vim defaults
set scrolloff=3 " keep 3 lines when scrolling
set ai " set auto-indenting on for programming
set showcmd " display incomplete commands
set nobackup " do not keep a backup file
set number " show line numbers
set ruler " show the current row and column
set hlsearch " highlight searches
set incsearch " do incremental searching
set showmatch " jump to matches when entering regexp
set ignorecase " ignore case when searching
set smartcase " no ignorecase if Uppercase char present
set visualbell t_vb= " turn off error beep/flash
set novisualbell " turn off visual bell
set backspace=indent,eol,start " make that backspace key work the way it should
set runtimepath=$VIMRUNTIME " turn off user scripts, https://github.com/igrigorik/vimgolf/issues/129
syntax on " turn syntax highlighting on by default
filetype on " detect type of file
filetype indent on " load indent file for specific file type
set t_RV= " http://bugs.debian.org/608242, http://groups.google.com/group/vim_dev/browse_thread/thread/9770ea844cec3282
view raw vimgolf.vimrc hosted with ❤ by GitHub

Comments / discussions on the vimrc

Setup Tips & Tricks

Windows users: To compete you will need to make sure that you can launch "vim" from your command prompt. .

Getting in touch

Moderators