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]

Played Challenges

Simple, Practical, and Common - 33385 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 22
  • Position: #86 / 7364
  • Number of attempts: 14
Swap the operands under comparison - 270 entries

Swap the operands under comparison to prevent null pointer exception (at least in java)

  • Best score: 19
  • Best player score: 20
  • Position: #33 / 98
  • Number of attempts: 3
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #406 / 4164
  • Number of attempts: 6
Basic renumbering - 5587 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 14
  • Position: #401 / 1258
  • Number of attempts: 6
Add to end of each line... kinda - 325 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 13
  • Position: #126 / 171
  • Number of attempts: 1
Vice versa - 7803 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #39 / 2100
  • Number of attempts: 8
Vim's not included features - 210 entries

Filter not included (-) features in a hypothetical installation of vim.

  • Best score: 23
  • Best player score: 43
  • Position: #59 / 62
  • Number of attempts: 1
convert yml into java pojo field - 829 entries

How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file

  • Best score: 29
  • Best player score: 29
  • Position: #23 / 223
  • Number of attempts: 13
Assign numbers to fields - 105 entries

You are given a list of space-separated strings. Add an increasing numeric prefix to each one.

  • Best score: 19
  • Best player score: 22
  • Position: #52 / 59
  • Number of attempts: 1
Entries sort - 81 entries

It cames to my mind a weird idea : sorting parts of my .vimrc. Take few minutes to sort out this, it's easy !

  • Best score: 14
  • Best player score: 18
  • Position: #33 / 38
  • Number of attempts: 1
swap or reverse - 115 entries

Try to swap or reverse the line as needed.

  • Best score: 16
  • Best player score: 16
  • Position: #35 / 66
  • Number of attempts: 2
Conway sequence - 23 entries

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

  • Best score: 43
  • Best player score: 43
  • Position: #5 / 18
  • Number of attempts: 1
increment by column in XML - 146 entries

modify an arbitrary "column" in an xml table by incrementing a an arbitrary placeholder string

  • Best score: 19
  • Best player score: 20
  • Position: #23 / 53
  • Number of attempts: 6
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 19
  • Position: #3489 / 4161
  • Number of attempts: 3
learn vim in short time - 232 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #76 / 158
  • Number of attempts: 2
vim1001 - 275 entries

change number 1001 into a "vim1001 sequence". (My first challenge, hope it is not too bad... )

  • Best score: 17
  • Best player score: 21
  • Position: #34 / 107
  • Number of attempts: 4
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Position: #123 / 1129
  • Number of attempts: 6
NBCU Weekly Challenge - Test - 243 entries

Just testing.

  • Best score: 18
  • Best player score: 18
  • Position: #45 / 114
  • Number of attempts: 6
A HAPPY NEW YEAR 2014 ! - 10624 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #790 / 3666
  • Number of attempts: 4
quotes inside quotes - 3125 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 14
  • Position: #205 / 1072
  • Number of attempts: 6
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #592 / 3946
  • Number of attempts: 6
Simple text editing with Vim - 12290 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 13
  • Position: #369 / 3581
  • Number of attempts: 7
Reformat/Refactor a Golfer Class - 6558 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 32
  • Best player score: 47
  • Position: #1215 / 1615
  • Number of attempts: 1
Joey
Twitter:

ML Engineer

entered into 23 challenges

contributed 0 challenges