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 - 875 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 23
  • Position: #158 / 240
  • Number of attempts: 6
New teacher - 1519 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 25
  • Position: #155 / 319
  • Number of attempts: 3
months to html list items - 1151 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 26
  • Position: #166 / 311
  • Number of attempts: 5
Find fix point of cos - 1485 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 / 434
  • Number of attempts: 3
Surround the 'z' character with brackets, quotes, and print as formatted string. - 582 entries

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

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

delete all swap

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 37
  • Position: #391 / 624
  • Number of attempts: 1
Migrated to Postgres! - 349 entries

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

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

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

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

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #186 / 214
  • Number of attempts: 1
Mr. Hacker - 104 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 / 39
  • Number of attempts: 1
Yo To Hello - 1156 entries

Simply Turn Yo To Hello

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

Just give me the numbers.

  • Best score: 14
  • Best player score: 29
  • Position: #3657 / 3904
  • Number of attempts: 1
Swap values inside brackets - 2551 entries

Easy challenge.

  • Best score: 13
  • Best player score: 16
  • Position: #281 / 594
  • Number of attempts: 4
Applying same text modification in several lines - 2931 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #503 / 867
  • Number of attempts: 1
Swap the operands under comparison - 325 entries

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

  • Best score: 19
  • Best player score: 24
  • Position: #73 / 108
  • Number of attempts: 1
Add semicolons - 10956 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 13
  • Position: #2108 / 3098
  • Number of attempts: 1
remove lines containing the word "reader" - 3652 entries

easy stuff

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

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

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

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

  • Best score: 5
  • Best player score: 5
  • Position: #330 / 451
  • Number of attempts: 1
Number Sort - 328 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 / 173
  • Number of attempts: 1
comment and uncomment code inline - 1182 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 / 332
  • Number of attempts: 5
Flip the bit - 144 entries

Change the specific 0 to a 1.

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

The team names are misspelled.

  • Best score: 16
  • Best player score: 19
  • Position: #473 / 596
  • Number of attempts: 2
For all cases. - 180 entries

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

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

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Position: #135 / 149
  • Number of attempts: 1
create arrows in a list - 146 entries

Add arrow at same distance

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

Just enjoy building "a" floors...

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

Increment each number individually by one

  • Best score: 15
  • Best player score: 21
  • Position: #190 / 260
  • Number of attempts: 3
Hail to Alekseï Pajitnov - 57 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 / 19
  • Number of attempts: 6
move titles next to url, in quotes - 565 entries

had trouble with something similar

  • Best score: 19
  • Best player score: 29
  • Position: #140 / 149
  • Number of attempts: 1
unknown command - 176 entries

I want change 5 words

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

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 23
  • Position: #356 / 655
  • Number of attempts: 2
Reconstruct the Sentence - 1745 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: #339 / 457
  • Number of attempts: 5
Simple text editing with Vim - 13626 entries

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

  • Best score: 13
  • Best player score: 19
  • Position: #2884 / 3902
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 7681 entries

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

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

entered into 36 challenges

contributed 0 challenges