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

Convert the data to a python dictionary

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

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

  • Best score: 24
  • Best player score: 27
  • Position: #86 / 232
  • Number of attempts: 6
Fizzbuzz - 343 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 47
  • Best player score: 48
  • Position: #17 / 110
  • Number of attempts: 7
Substraction (bis) - 383 entries

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

  • Best score: 22
  • Best player score: 31
  • Position: #39 / 80
  • Number of attempts: 5
Changing around text with citations - 197 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 41
  • Position: #40 / 60
  • Number of attempts: 3
Poorly indented Python comments - 866 entries

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

  • Best score: 15
  • Best player score: 24
  • Position: #61 / 168
  • Number of attempts: 4
Many duplicates - 845 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #127 / 285
  • Number of attempts: 2
2 quick changes and a numbered list - 451 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: #36 / 108
  • Number of attempts: 3
delete swap - 1087 entries

delete all swap

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 36
  • Position: #252 / 418
  • Number of attempts: 1
Visual block training - 780 entries

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #317 / 457
  • Number of attempts: 2
Wikitext headings to markdown - 781 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 25
  • Position: #88 / 172
  • Number of attempts: 4
hello-world-vimgolf - 1978 entries

Simple number generation

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

Speak in tongues

  • Best score: 17
  • Best player score: 19
  • Position: #124 / 230
  • Number of attempts: 2
Increment number for every 10 lines - 180 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 / 53
  • Number of attempts: 9
Inverting Lines - 1562 entries

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

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 43
  • Position: #131 / 260
  • Number of attempts: 3
Enumerate Bullets - 253 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: #36 / 67
  • Number of attempts: 2
Put a cross in the square - 174 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #51 / 75
  • Number of attempts: 2
swap number pairs - 1871 entries

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

  • Best score: 16
  • Best player score: 18
  • Position: #120 / 346
  • Number of attempts: 5
HS Final exam vimgolf - 804 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: #104 / 215
  • Number of attempts: 4
Easy modification of ssh config - 305 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 27
  • Position: #49 / 95
  • 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 - 410 entries

LAMBDA!!!

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

Turn the x to a +

  • Best score: 19
  • Best player score: 24
  • Position: #54 / 71
  • 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 - 4254 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #441 / 1044
  • Number of attempts: 1
Satisfy the go linter - 2076 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: #199 / 422
  • Number of attempts: 1
xrandr outputs and dashes - 624 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 / 205
  • Number of attempts: 2
Capitalize the Names - 330 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 / 84
  • Number of attempts: 1
Yo To Hello - 1081 entries

Simply Turn Yo To Hello

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

Change Typescript enum so that it has string initializers.

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

Renumbering Basic.

  • Best score: 11
  • Best player score: 11
  • Position: #266 / 1245
  • Number of attempts: 1
Combines all items - 292 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 / 132
  • 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 - 520 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #286 / 338
  • Number of attempts: 1
Condensed Cases - 775 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 / 239
  • Number of attempts: 1
quotes inside quotes - 3088 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: #501 / 1060
  • 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