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]

23776 active golfers, 256782 entries, 416 challenges

Open VimGolf challenges

Greek Letters - 39 entries

Starting with a list of Greek letters, create a cross-reference table showing all of the Greek alpha-beta. You'll likely need to use digraphs (:help digraphs). Note that while most digraphs can be entered with either character first, lowercase sigma has two digraphs -- s* AND *s! Good luck!

Change The Perspective - 36 entries

This is a go game recodes file(.sgf file, refer to http://www.red-bean.com/sgf/). It base on such a coordinate system: in vertical direction, is from top(farthest end) to bottom, mark as a,b,c,...,s(19*19 board); in horizontal direction, is from left to right, uses the same notations. For Example, the coordinate notation 'cq', is the position at the bottom-left corner(vertical coordinate first). The record is from one player's perspective. We need to change to another's, but we don't want to change coordinate system, let it keep top to bottom and left to right. so we have to change the coordinates, a <-> s, b <-> r,c <-> q, etc. the Position 'cq', as transformation, it will be 'qd'.

Palindrome numbers - 10 entries

For each number compute its associated palindrome. First number (first line) has been eaten! #prime

Refactor to Helpers - 45 entries

This Rails partial is almost all template escapes. Put it into a helper, and refactor each case to methods so we can build out the controls for each. (I've converted to tabs - fighting with Vimgolf's default config shouldn't be part of the challenge.)

50 factorials mod 97 - 24 entries

List 1! to 50!, but give your answer mod 97.

Config Sections - 25 entries

Section me!

199 Fibonacci Numbers - 35 entries

Generate 199 Fibonacci Numbers using, if you like, the function S(x,y), a vimscript to sum two big numbers in reverse order.

LaTeX to XML Math Delimiters - 35 entries

Vim is amazing when used to edit MediaWiki text, but typing "<math> . . . </math>" can be tiresome and frustrating if formulas are used often. LaTeX delimiters are so concise and even come in two flavors: "\( . . . \)" for inline math and "\[ . . . \]" for centered formulas. The goal is to perform the following conversions: "\( . . . \)" becomes "<math>. . .</math>" "\[ . . . \]" becomes "<center><math>. . .</math></center>"

Custom McCarthy sequence - 22 entries

Generate the first one hundred and twenty numbers (starting with n=1). See here for some inspiration: http://en.wikipedia.org/wiki/McCarthy_91_function

Hail to Alekseï Pajitnov - 23 entries

Wanna play tetris? Don't panic, it's quite long but there's no piece rotation. Little advice: source the file, Luke!

Acute accents - 24 entries

Featuring all 17 lowercase letters with an acute accent digraph. Find a way to automate the digraphs.

Convert pasted text into Markdown - 16 entries

I often need to copy/paste text into Markdown files. The challenge here is to wrap the lines in a way that prefers breaks after periods, commas, or other logical demarcations. There should be no spaces at the beginning of a line.

Forgot to follow the naming convention... - 18 entries

Rename everything like MY_VAR_SOMETHING to MyVarSomething.

No naked if allowed! - 16 entries

House style forbids naked condition statements, comments should start with a space character and be on their own line. Good luck!

Conway sequence - 18 entries

Generate the the first fifteen numbers. See here for more information: http://en.wikipedia.org/wiki/Look-and-say_sequence

Splits long lines in more readable ones - 2 entries

Those tests have too long lines. We have to split the to have more readable ones. This is based on a real project with Ruby and RSpec.

VimGolf Chatter