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 - 33621 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: #1606 / 7422
  • Number of attempts: 6
One number per line - 18732 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 15
  • Position: #780 / 3865
  • Number of attempts: 9
Applying same text modification in several lines - 2880 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 22
  • Position: #737 / 851
  • Number of attempts: 3
remove lines containing the word "reader" - 3586 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #41 / 1162
  • Number of attempts: 2
Change part of a function name in multiple occurrences - 662 entries

Change the middle part of the function name in multiple places, preferably using the next and dot commands.

  • Best score: 14
  • Best player score: 15
  • Position: #83 / 208
  • Number of attempts: 5
Put the months in order - 974 entries

Our contractor thought that months should be in alphabetical order. Put them in calendar order please.

  • Best score: 20
  • Best player score: 42
  • Position: #90 / 163
  • Number of attempts: 3
VimGolfNight - 560 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #24 / 347
  • Number of attempts: 2
quotes inside quotes - 3159 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: 17
  • Position: #707 / 1078
  • Number of attempts: 1
Sort the VimGolf challenges by popularity - 348 entries

"Sort by popularity" is a good order to play the challenges. Not perfect, but you could do a lot worse. ;) Input is a sample copy-pasted from vimgolf.com. Some of the challenge names have digits that will get in your way, so read ":help :sort" for hints on sorting with a regex. When you're done, try your solution on the full list!

  • Best score: 15
  • Best player score: 17
  • Position: #64 / 107
  • Number of attempts: 2
Words in parens - 12939 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1192 / 3964
  • Number of attempts: 4
Draw the Go board - 149 entries

which is a 19×19 lines board. Here we use ascii characters only for simplicity. See diff file to get a sense. (See also http://en.wikipedia.org/wiki/Go_(game))

  • Best score: 50
  • Best player score: 76
  • Position: #40 / 51
  • Number of attempts: 2
Word frequency alignment - 290 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Position: #20 / 161
  • Number of attempts: 2
Execute immediate SQL - 90 entries

Sql string tranformation ...

  • Best score: 58
  • Best player score: 82
  • Position: #27 / 32
  • Number of attempts: 2
abcd > a b c d - 291 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #35 / 222
  • Number of attempts: 1
Saving the hashes(#) - 2063 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 32
  • Position: #415 / 480
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 6984 entries

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

  • Best score: 28
  • Best player score: 47
  • Position: #1250 / 1708
  • Number of attempts: 1
Fl4t
Twitter:

GNU/Linux, starcraft2 master rank, ViM user, Git user, devOps.

entered into 16 challenges

contributed 0 challenges