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

Convert the data to a python dictionary

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

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

  • Best score: 24
  • Best player score: 27
  • Position: #122 / 322
  • Number of attempts: 6
Fizzbuzz - 502 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 47
  • Best player score: 48
  • Position: #20 / 155
  • Number of attempts: 7
Substraction (bis) - 570 entries

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

  • Best score: 21
  • Best player score: 31
  • Position: #56 / 106
  • Number of attempts: 5
Changing around text with citations - 322 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 41
  • Position: #55 / 88
  • Number of attempts: 3
Poorly indented Python comments - 1159 entries

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

  • Best score: 15
  • Best player score: 24
  • Position: #78 / 201
  • Number of attempts: 4
Many duplicates - 1248 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #142 / 408
  • Number of attempts: 2
2 quick changes and a numbered list - 599 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: #45 / 145
  • Number of attempts: 3
delete swap - 1522 entries

delete all swap

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 36
  • Position: #329 / 538
  • Number of attempts: 1
Visual block training - 1000 entries

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #360 / 523
  • Number of attempts: 2
Wikitext headings to markdown - 978 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 25
  • Position: #109 / 202
  • Number of attempts: 4
hello-world-vimgolf - 2341 entries

Simple number generation

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

Speak in tongues

  • Best score: 17
  • Best player score: 19
  • Position: #140 / 255
  • Number of attempts: 2
Increment number for every 10 lines - 219 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: #23 / 61
  • Number of attempts: 9
Inverting Lines - 1829 entries

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

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 43
  • Position: #151 / 307
  • Number of attempts: 3
Enumerate Bullets - 292 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: #39 / 80
  • Number of attempts: 2
Put a cross in the square - 203 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #57 / 84
  • Number of attempts: 2
swap number pairs - 2011 entries

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

  • Best score: 16
  • Best player score: 18
  • Position: #130 / 370
  • Number of attempts: 5
HS Final exam vimgolf - 864 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: #111 / 227
  • Number of attempts: 4
Easy modification of ssh config - 335 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 27
  • Position: #54 / 104
  • Number of attempts: 2
Mr. Hacker - 78 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: #27 / 32
  • Number of attempts: 2
Python: Def to Lambda - 423 entries

LAMBDA!!!

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

Turn the x to a +

  • Best score: 19
  • Best player score: 24
  • Position: #58 / 77
  • Number of attempts: 2
Format the CSS - 115 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: #30 / 43
  • Number of attempts: 1
Rural Post - 4360 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #448 / 1070
  • Number of attempts: 1
Satisfy the go linter - 2328 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: #224 / 456
  • Number of attempts: 1
xrandr outputs and dashes - 652 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 / 213
  • Number of attempts: 2
Capitalize the Names - 361 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: #67 / 91
  • Number of attempts: 1
Yo To Hello - 1110 entries

Simply Turn Yo To Hello

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

Change Typescript enum so that it has string initializers.

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

Renumbering Basic.

  • Best score: 11
  • Best player score: 11
  • Position: #266 / 1258
  • Number of attempts: 1
Combines all items - 303 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 / 137
  • Number of attempts: 2
replace 2nd column blanks with values in same column if blank - 231 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 / 81
  • Number of attempts: 1
Change attribute to getter - 133 entries

Wrap attributes with a getter method.

  • Best score: 24
  • Best player score: 25
  • Position: #44 / 57
  • Number of attempts: 3
VimGolfNight - 536 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #286 / 343
  • Number of attempts: 1
Condensed Cases - 788 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: #144 / 242
  • Number of attempts: 1
quotes inside quotes - 3125 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: #507 / 1072
  • Number of attempts: 3
Array Transposition - 177 entries

Transpose four arrays into two.

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

永遠の空回り

entered into 42 challenges

contributed 0 challenges