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]

30437 active golfers, 371003 entries, 513 challenges

Open VimGolf challenges

Palindrome numbers - 17 entries

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

citizen_hacks_2019_part9 - 7 entries

For the Citizen Hacks 2019 Vim competition

citizen_hacks_2019_part4 - 7 entries

For the Citizen Hacks 2019 Vim competition

citizen_hacks_2019_part3 - 7 entries

For the Citizen Hacks 2019 Vim competition

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'.

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

Rename everything like MY_VAR_SOMETHING to MyVarSomething.

199 Fibonacci Numbers - 36 entries

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

sort python functions and methods alphabetically - 14 entries

* sort functions in the python file alphabetically * sort functions within a Class alphabetically * sort Classes alphabetically

Convert pasted text into Markdown - 20 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.

Conway sequence - 22 entries

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

Lenny Spiral - 11 entries

Make one lenny into an infinite army of lennys.

Splits long lines in more readable ones - 10 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.

Back to the Future - 3 entries

We can't just time-travel around without first making sure our code is pretty and columns are aligned. And keeping lines with at most 80 characters should help if we ever need to review the code while we're stuck in the past. This is my first challenge. I tried being creative and even did a bit of research, so I hope you enjoy it.

VimGolf Chatter