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

Convert the data to a python dictionary

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

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

  • Best score: 24
  • Best player score: 27
  • Position: #134 / 352
  • Number of attempts: 6
Fizzbuzz - 586 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 44
  • Best player score: 48
  • Position: #24 / 169
  • Number of attempts: 7
Substraction (bis) - 619 entries

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

  • Best score: 21
  • Best player score: 31
  • Position: #60 / 114
  • Number of attempts: 5
Changing around text with citations - 340 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 41
  • Position: #58 / 94
  • Number of attempts: 3
Poorly indented Python comments - 1328 entries

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

  • Best score: 15
  • Best player score: 24
  • Position: #90 / 223
  • Number of attempts: 4
Many duplicates - 1459 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #151 / 476
  • Number of attempts: 2
2 quick changes and a numbered list - 648 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: #48 / 155
  • Number of attempts: 3
delete swap - 1809 entries

delete all swap

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 36
  • Position: #358 / 607
  • Number of attempts: 1
Visual block training - 1089 entries

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #371 / 559
  • Number of attempts: 2
Wikitext headings to markdown - 1003 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 25
  • Position: #111 / 210
  • Number of attempts: 4
hello-world-vimgolf - 2506 entries

Simple number generation

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

Speak in tongues

  • Best score: 17
  • Best player score: 19
  • Position: #149 / 272
  • Number of attempts: 2
Increment number for every 10 lines - 231 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 / 65
  • Number of attempts: 9
Inverting Lines - 1923 entries

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

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 43
  • Position: #160 / 326
  • Number of attempts: 3
Enumerate Bullets - 327 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: 18
  • Best player score: 24
  • Position: #42 / 89
  • Number of attempts: 2
Put a cross in the square - 235 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #61 / 92
  • Number of attempts: 2
swap number pairs - 2128 entries

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

  • Best score: 16
  • Best player score: 18
  • Position: #135 / 388
  • Number of attempts: 5
HS Final exam vimgolf - 912 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: #120 / 240
  • Number of attempts: 4
Easy modification of ssh config - 382 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 27
  • Position: #60 / 115
  • Number of attempts: 2
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: 21
  • Position: #31 / 36
  • Number of attempts: 2
Python: Def to Lambda - 460 entries

LAMBDA!!!

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

Turn the x to a +

  • Best score: 19
  • Best player score: 24
  • Position: #61 / 82
  • Number of attempts: 2
Format the CSS - 158 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: #35 / 49
  • Number of attempts: 1
Rural Post - 4567 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #462 / 1114
  • Number of attempts: 1
Satisfy the go linter - 2450 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: #231 / 485
  • Number of attempts: 1
xrandr outputs and dashes - 724 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 / 225
  • Number of attempts: 2
Capitalize the Names - 412 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: #73 / 98
  • Number of attempts: 1
Yo To Hello - 1151 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 10
  • Position: #375 / 533
  • Number of attempts: 1
Add string initializers to an enum - 884 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 23
  • Position: #122 / 261
  • 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 - 5685 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 11
  • Position: #266 / 1270
  • 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 - 157 entries

Wrap attributes with a getter method.

  • Best score: 24
  • Best player score: 25
  • Position: #48 / 63
  • Number of attempts: 3
VimGolfNight - 575 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #286 / 352
  • Number of attempts: 1
Condensed Cases - 807 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: #147 / 248
  • Number of attempts: 1
quotes inside quotes - 3182 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: #511 / 1085
  • Number of attempts: 3
Array Transposition - 202 entries

Transpose four arrays into two.

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

永遠の空回り

entered into 42 challenges

contributed 0 challenges