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

Convert the data to a python dictionary

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

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

  • Best score: 24
  • Best player score: 27
  • Position: #69 / 180
  • Number of attempts: 6
Fizzbuzz - 267 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 47
  • Best player score: 48
  • Position: #16 / 89
  • Number of attempts: 7
Substraction (bis) - 311 entries

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

  • Best score: 22
  • Best player score: 31
  • Position: #33 / 69
  • Number of attempts: 5
Changing around text with citations - 181 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 41
  • Position: #37 / 53
  • Number of attempts: 3
Poorly indented Python comments - 774 entries

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

  • Best score: 15
  • Best player score: 24
  • Position: #56 / 151
  • Number of attempts: 4
Many duplicates - 719 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #126 / 242
  • Number of attempts: 2
2 quick changes and a numbered list - 384 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: #33 / 94
  • Number of attempts: 3
delete swap - 830 entries

delete all swap

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 36
  • Position: #220 / 373
  • Number of attempts: 1
Visual block training - 687 entries

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #297 / 423
  • Number of attempts: 2
Wikitext headings to markdown - 737 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 25
  • Position: #85 / 164
  • Number of attempts: 4
hello-world-vimgolf - 1850 entries

Simple number generation

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

Speak in tongues

  • Best score: 17
  • Best player score: 19
  • Position: #122 / 221
  • Number of attempts: 2
Increment number for every 10 lines - 177 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: #21 / 51
  • Number of attempts: 9
Inverting Lines - 1472 entries

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

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 43
  • Position: #124 / 235
  • Number of attempts: 3
Enumerate Bullets - 241 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: #35 / 63
  • Number of attempts: 2
Put a cross in the square - 148 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #49 / 65
  • Number of attempts: 2
swap number pairs - 1808 entries

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

  • Best score: 16
  • Best player score: 18
  • Position: #116 / 332
  • Number of attempts: 5
HS Final exam vimgolf - 782 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: #101 / 209
  • Number of attempts: 4
Easy modification of ssh config - 289 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 27
  • Position: #47 / 90
  • Number of attempts: 2
Mr. Hacker - 76 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: #26 / 31
  • Number of attempts: 2
Python: Def to Lambda - 396 entries

LAMBDA!!!

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

Turn the x to a +

  • Best score: 19
  • Best player score: 24
  • Position: #53 / 69
  • Number of attempts: 2
Format the CSS - 109 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: #28 / 40
  • Number of attempts: 1
Rural Post - 4197 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #437 / 1035
  • Number of attempts: 1
Satisfy the go linter - 2041 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: #196 / 416
  • Number of attempts: 1
xrandr outputs and dashes - 619 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 / 202
  • Number of attempts: 2
Capitalize the Names - 328 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: #61 / 83
  • Number of attempts: 1
Yo To Hello - 1067 entries

Simply Turn Yo To Hello

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

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 23
  • Position: #113 / 244
  • Number of attempts: 4
Turn a ninja to case-insensitive [Nn][Ii][Nn][Jj][Aa] regexp! - 53 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 / 32
  • Number of attempts: 1
Basic renumbering - 5484 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 11
  • Position: #266 / 1241
  • Number of attempts: 1
Combines all items - 290 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 / 131
  • Number of attempts: 2
replace 2nd column blanks with values in same column if blank - 226 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: #39 / 78
  • Number of attempts: 1
Change attribute to getter - 127 entries

Wrap attributes with a getter method.

  • Best score: 24
  • Best player score: 25
  • Position: #41 / 53
  • Number of attempts: 3
VimGolfNight - 517 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #286 / 337
  • Number of attempts: 1
Condensed Cases - 772 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: #143 / 237
  • Number of attempts: 1
quotes inside quotes - 3077 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: #499 / 1057
  • Number of attempts: 3
Array Transposition - 169 entries

Transpose four arrays into two.

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

永遠の空回り

entered into 42 challenges

contributed 0 challenges