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

Reorganize Pokémon - 846 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 23
  • Position: #154 / 232
  • Number of attempts: 6
New teacher - 1499 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 25
  • Position: #152 / 313
  • Number of attempts: 3
months to html list items - 1135 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 26
  • Position: #164 / 307
  • Number of attempts: 5
Find fix point of cos - 1483 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 15
  • Position: #264 / 433
  • Number of attempts: 3
Surround the 'z' character with brackets, quotes, and print as formatted string. - 580 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #241 / 326
  • Number of attempts: 1
delete swap - 1880 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #385 / 575
  • Number of attempts: 4
Fix the shell script! - 2676 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 37
  • Position: #389 / 622
  • Number of attempts: 1
Migrated to Postgres! - 348 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

  • Best score: 26
  • Best player score: 27
  • Position: #38 / 134
  • Number of attempts: 1
Inverting Lines - 1954 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 10
  • Position: #235 / 523
  • Number of attempts: 5
Making 3 line function a one liner. - 345 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #186 / 212
  • Number of attempts: 1
Mr. Hacker - 98 entries

Elvin is hacker. He has piece of users database from some social net site. Recently he installed Vim, and he wants to convert CSV DB to specific format `key=value' where `key' is login and `value' is password, but password in DB is encrypted in ROT13. Help him.

  • Best score: 19
  • Best player score: 20
  • Position: #28 / 37
  • Number of attempts: 1
Yo To Hello - 1154 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 10
  • Position: #410 / 535
  • Number of attempts: 1
One number per line - 18889 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 29
  • Position: #3651 / 3898
  • Number of attempts: 1
Swap values inside brackets - 2545 entries

Easy challenge.

  • Best score: 13
  • Best player score: 16
  • Position: #280 / 591
  • Number of attempts: 4
Applying same text modification in several lines - 2927 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #502 / 865
  • Number of attempts: 1
Swap the operands under comparison - 318 entries

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

  • Best score: 19
  • Best player score: 24
  • Position: #72 / 106
  • Number of attempts: 1
Add semicolons - 10934 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 13
  • Position: #2103 / 3092
  • Number of attempts: 1
remove lines containing the word "reader" - 3643 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #877 / 1181
  • Number of attempts: 1
Com(m)a Trouble - 3988 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 24
  • Position: #728 / 908
  • Number of attempts: 1
Wrap the text of an email message to 79 characters - 859 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #330 / 445
  • Number of attempts: 1
Number Sort - 321 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

  • Best score: 9
  • Best player score: 9
  • Position: #144 / 171
  • Number of attempts: 1
comment and uncomment code inline - 1158 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 10
  • Position: #226 / 329
  • Number of attempts: 5
Flip the bit - 140 entries

Change the specific 0 to a 1.

  • Best score: 8
  • Best player score: 8
  • Position: #41 / 79
  • Number of attempts: 3
Team names - 1858 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 19
  • Position: #471 / 594
  • Number of attempts: 2
For all cases. - 169 entries

In this case... change it! :) Watch the line.

  • Best score: 8
  • Best player score: 8
  • Position: #94 / 109
  • Number of attempts: 2
Remember VimGolf Rules ! - 277 entries

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Position: #134 / 147
  • Number of attempts: 1
create arrows in a list - 136 entries

Add arrow at same distance

  • Best score: 10
  • Best player score: 10
  • Position: #66 / 79
  • Number of attempts: 1
Build a six - 314 entries

Just enjoy building "a" floors...

  • Best score: 22
  • Best player score: 22
  • Position: #63 / 101
  • Number of attempts: 3
Increment each number - 1062 entries

Increment each number individually by one

  • Best score: 15
  • Best player score: 21
  • Position: #188 / 257
  • Number of attempts: 3
Hail to Alekseï Pajitnov - 50 entries

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

  • Best score: 51
  • Best player score: 51
  • Position: #4 / 17
  • Number of attempts: 6
move titles next to url, in quotes - 558 entries

had trouble with something similar

  • Best score: 19
  • Best player score: 29
  • Position: #139 / 147
  • Number of attempts: 1
unknown command - 175 entries

I want change 5 words

  • Best score: 7
  • Best player score: 7
  • Position: #72 / 91
  • Number of attempts: 1
Change the content of a string - 1766 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 23
  • Position: #351 / 648
  • Number of attempts: 2
Reconstruct the Sentence - 1717 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 19
  • Best player score: 24
  • Position: #335 / 452
  • Number of attempts: 5
Simple text editing with Vim - 13521 entries

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

  • Best score: 13
  • Best player score: 19
  • Position: #2864 / 3877
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 7584 entries

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

  • Best score: 7
  • Best player score: 37
  • Position: #615 / 1872
  • Number of attempts: 6
Nalfein (Kenny)
Github:

entered into 36 challenges

contributed 0 challenges