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

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 23
  • Position: #137 / 190
  • Number of attempts: 6
New teacher - 1419 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 25
  • Position: #146 / 299
  • Number of attempts: 3
months to html list items - 1108 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 26
  • Position: #161 / 300
  • Number of attempts: 5
Find fix point of cos - 1444 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: #262 / 427
  • Number of attempts: 3
Surround the 'z' character with brackets, quotes, and print as formatted string. - 572 entries

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

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

delete all swap

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 37
  • Position: #385 / 616
  • Number of attempts: 1
Migrated to Postgres! - 338 entries

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

  • Best score: 26
  • Best player score: 27
  • Position: #37 / 133
  • Number of attempts: 1
Inverting Lines - 1932 entries

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

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

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #186 / 209
  • Number of attempts: 1
Mr. Hacker - 90 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: #27 / 36
  • Number of attempts: 1
Yo To Hello - 1152 entries

Simply Turn Yo To Hello

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

Just give me the numbers.

  • Best score: 14
  • Best player score: 29
  • Position: #3644 / 3889
  • Number of attempts: 1
Swap values inside brackets - 2523 entries

Easy challenge.

  • Best score: 13
  • Best player score: 16
  • Position: #277 / 587
  • Number of attempts: 4
Applying same text modification in several lines - 2915 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #500 / 863
  • Number of attempts: 1
Swap the operands under comparison - 313 entries

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

  • Best score: 19
  • Best player score: 24
  • Position: #71 / 105
  • Number of attempts: 1
Add semicolons - 10916 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 13
  • Position: #2097 / 3085
  • Number of attempts: 1
remove lines containing the word "reader" - 3622 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #874 / 1177
  • Number of attempts: 1
Com(m)a Trouble - 3941 entries

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

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

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

  • Best score: 5
  • Best player score: 5
  • Position: #330 / 437
  • Number of attempts: 1
Number Sort - 319 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 / 170
  • Number of attempts: 1
comment and uncomment code inline - 1151 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: #225 / 328
  • Number of attempts: 5
Flip the bit - 137 entries

Change the specific 0 to a 1.

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

The team names are misspelled.

  • Best score: 16
  • Best player score: 19
  • Position: #469 / 592
  • Number of attempts: 2
For all cases. - 168 entries

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

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

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Position: #133 / 145
  • Number of attempts: 1
create arrows in a list - 130 entries

Add arrow at same distance

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

Just enjoy building "a" floors...

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

Increment each number individually by one

  • Best score: 15
  • Best player score: 21
  • Position: #187 / 255
  • Number of attempts: 3
Hail to Alekseï Pajitnov - 43 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 / 16
  • Number of attempts: 6
move titles next to url, in quotes - 551 entries

had trouble with something similar

  • Best score: 19
  • Best player score: 29
  • Position: #138 / 146
  • Number of attempts: 1
unknown command - 169 entries

I want change 5 words

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

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 23
  • Position: #345 / 628
  • Number of attempts: 2
Reconstruct the Sentence - 1677 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: #329 / 440
  • Number of attempts: 5
Simple text editing with Vim - 13262 entries

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

  • Best score: 13
  • Best player score: 19
  • Position: #2824 / 3810
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 7389 entries

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

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

entered into 36 challenges

contributed 0 challenges