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

Remove line numbers - 731 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 9
  • Best player score: 30
  • Position: #144 / 194
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 554 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 17
  • Position: #128 / 309
  • Number of attempts: 4
Reformat symbols in list - 1614 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 24
  • Position: #49 / 347
  • Number of attempts: 17
delete swap - 1783 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #279 / 555
  • Number of attempts: 3
Fix the shell script! - 2544 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 26
  • Position: #49 / 589
  • Number of attempts: 11
Plotting some variables in python - 1661 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 34
  • Position: #57 / 348
  • Number of attempts: 15
swap number pairs - 2103 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 23
  • Position: #176 / 380
  • Number of attempts: 5
SCREAMING_SNAKE_CASE to Title Case - 1214 entries

Convert strings in SCREAMING_SNAKE_CASE to Title Case. Examples: EMPLOYEE_NAME -> Employee Name REVENUE_YEAR_TO_DATE -> Revenue Year To Date SALARY -> Salary

  • Best score: 19
  • Best player score: 19
  • Position: #61 / 249
  • Number of attempts: 13
Add semicolons - 10851 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #760 / 3063
  • Number of attempts: 6
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #238 / 701
  • Number of attempts: 8
learn vim in short time - 240 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #128 / 161
  • Number of attempts: 3
Gray area - 747 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 11
  • Position: #24 / 271
  • Number of attempts: 12
Getters & Setters: Java - 207 entries

Boilerplate getters & setters - it's a tedious fact of life in Java, and probably the only thing that still pulls me back to an IDE. Perhaps someone knows a fast, pure vim way...

  • Best score: 89
  • Best player score: 98
  • Position: #15 / 58
  • Number of attempts: 10
The Cake is a Lie - 1344 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #279 / 526
  • Number of attempts: 3
Context insensitive completion 0 - 577 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

  • Best score: 6
  • Best player score: 7
  • Position: #121 / 246
  • Number of attempts: 13
Context Insensitive completion 1 - 498 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Position: #156 / 245
  • Number of attempts: 10
Linear congruential generator - 142 entries

http://en.wikipedia.org/wiki/Linear_congruential_generator

  • Best score: 28
  • Best player score: 28
  • Position: #4 / 53
  • Number of attempts: 13
Change the content of a string - 1575 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 29
  • Position: #519 / 587
  • Number of attempts: 2
Braces or Brackets? - 1014 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 34
  • Position: #31 / 314
  • Number of attempts: 13
Flodder-challenge - 1259 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 27
  • Position: #26 / 334
  • Number of attempts: 11
Simple text editing with Vim - 12787 entries

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

  • Best score: 13
  • Best player score: 61
  • Position: #3638 / 3688
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 6968 entries

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

  • Best score: 28
  • Best player score: 35
  • Position: #398 / 1702
  • Number of attempts: 18
Paul Molloy
Twitter2:

2nd Year Computer Science Student at Trinity

entered into 22 challenges

contributed 0 challenges