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

HS exam question - 1557 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 49
  • Position: #47 / 411
  • Number of attempts: 9
Reformat symbols in list - 1581 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #128 / 339
  • Number of attempts: 6
Fizzbuzz - 557 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 48
  • Position: #22 / 166
  • Number of attempts: 7
Substraction (bis) - 584 entries

Solve the equations (adapted from the original @Caek_'s challenge).

  • Best score: 21
  • Best player score: 31
  • Position: #57 / 111
  • Number of attempts: 5
Changing around text with citations - 327 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 41
  • Position: #57 / 92
  • Number of attempts: 3
Poorly indented Python comments - 1300 entries

Fix the alignment of some Python comments as quickly as possible.

  • Best score: 15
  • Best player score: 24
  • Position: #88 / 218
  • Number of attempts: 4
Many duplicates - 1425 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #149 / 461
  • Number of attempts: 2
2 quick changes and a numbered list - 642 entries

The ascii will not be lost, but rather numbered in 4 digit blocks with leading zeros.

  • Best score: 37
  • Best player score: 39
  • Position: #47 / 153
  • Number of attempts: 3
delete swap - 1758 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #116 / 544
  • Number of attempts: 1
Fix the shell script! - 2540 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 36
  • Position: #350 / 587
  • Number of attempts: 1
Visual block training - 1069 entries

You see the input. You see the output. Go.

  • Best score: 17
  • Best player score: 23
  • Position: #68 / 203
  • Number of attempts: 3
Put a newline after every 10 lines in vim - 1656 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 13
  • Position: #370 / 555
  • Number of attempts: 2
Wikitext headings to markdown - 986 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 25
  • Position: #110 / 208
  • Number of attempts: 4
hello-world-vimgolf - 2484 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #222 / 703
  • Number of attempts: 1
Contribute to keyboard mashing - 890 entries

Speak in tongues

  • Best score: 17
  • Best player score: 19
  • Position: #147 / 270
  • Number of attempts: 2
Increment number for every 10 lines - 229 entries

The file consists of 2 columns (code and percentage). We need to add 2 more columns with increasing number for 4th column (Xcols) and increment 3rd column (Ycols) only for every 10 lines with reset of 4th column

  • Best score: 25
  • Best player score: 30
  • Position: #25 / 63
  • Number of attempts: 9
Inverting Lines - 1879 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #176 / 507
  • Number of attempts: 1
Modernise code - 1386 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 43
  • Position: #156 / 318
  • Number of attempts: 3
Enumerate Bullets - 320 entries

We will need to refer to the bullet points in our document explicitly later, so we need to assign them some ID's!

  • Best score: 20
  • Best player score: 24
  • Position: #41 / 84
  • Number of attempts: 2
Put a cross in the square - 221 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #60 / 88
  • Number of attempts: 2
swap number pairs - 2064 entries

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

  • Best score: 16
  • Best player score: 18
  • Position: #131 / 375
  • Number of attempts: 5
HS Final exam vimgolf - 894 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 25
  • Position: #117 / 235
  • Number of attempts: 4
Easy modification of ssh config - 353 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 27
  • Position: #56 / 109
  • Number of attempts: 2
Mr. Hacker - 89 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: 21
  • Position: #30 / 35
  • Number of attempts: 2
Python: Def to Lambda - 453 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #77 / 155
  • Number of attempts: 1
Turn the x - 326 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 24
  • Position: #61 / 81
  • Number of attempts: 2
Format the CSS - 152 entries

You just copied some CSS color names from the web and need to add them to your python module. Create the COLORS variable and assign a dict() with the names as keys and hex-colors as values. BEWARE OF THE TABS!!

  • Best score: 41
  • Best player score: 47
  • Position: #34 / 47
  • Number of attempts: 1
Rural Post - 4450 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 10
  • Position: #456 / 1089
  • Number of attempts: 1
Satisfy the go linter - 2366 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 23
  • Position: #227 / 467
  • Number of attempts: 1
xrandr outputs and dashes - 700 entries

uh oh, different video drivers identify display outputs with more dashes. Quick, need to change this xrandr script!

  • Best score: 12
  • Best player score: 12
  • Position: #134 / 220
  • Number of attempts: 2
Capitalize the Names - 407 entries

I want to capitalize the names in quotes, but just the people's names, not the file names.

  • Best score: 21
  • Best player score: 32
  • Position: #72 / 96
  • Number of attempts: 1
Yo To Hello - 1127 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #374 / 522
  • Number of attempts: 1
Add string initializers to an enum - 872 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 23
  • Position: #120 / 258
  • Number of attempts: 4
Turn a ninja to case-insensitive [Nn][Ii][Nn][Jj][Aa] regexp! - 67 entries

I bumped into this in a dailywtf code: http://pastebin.com/QApa5ycS I didn't want to translate a string whenever I wanted to be [Ss][Aa][Rr][Cc][Aa][Ss][Tt][Ii][Cc] on slack, so I figured a script (python, sed, whatever) would be helpful. Well, or a few vim keystroke!

  • Best score: 18
  • Best player score: 18
  • Position: #28 / 39
  • Number of attempts: 1
Basic renumbering - 5643 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 11
  • Position: #266 / 1261
  • Number of attempts: 1
Combines all items - 313 entries

For each line that starts with the same number I want to combine its contents

  • Best score: 9
  • Best player score: 9
  • Position: #84 / 140
  • Number of attempts: 2
replace 2nd column blanks with values in same column if blank - 242 entries

Where ,SOMELOGB and ,SOMELOGC replaces each /r carriage return if 2nd column is blank. The replace only happens if 2nd column is blank though and should replace up to the non blank row.

  • Best score: 15
  • Best player score: 16
  • Position: #41 / 83
  • Number of attempts: 1
Change attribute to getter - 140 entries

Wrap attributes with a getter method.

  • Best score: 24
  • Best player score: 25
  • Position: #45 / 59
  • Number of attempts: 3
VimGolfNight - 555 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #286 / 345
  • Number of attempts: 1
Condensed Cases - 800 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 14
  • Position: #146 / 245
  • Number of attempts: 1
quotes inside quotes - 3154 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: 15
  • Position: #509 / 1075
  • Number of attempts: 3
Array Transposition - 196 entries

Transpose four arrays into two.

  • Best score: 27
  • Best player score: 57
  • Position: #48 / 55
  • Number of attempts: 1
キムラ・OPEL・ユウジ
Twitter:

永遠の空回り

entered into 42 challenges

contributed 0 challenges