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

Paste a column after a column - 2610 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 14
  • Best player score: 24
  • Position: #381 / 566
  • Number of attempts: 2
HS exam question - 1596 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 98
  • Position: #330 / 418
  • Number of attempts: 1
Changing around text with citations - 340 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 40
  • Position: #54 / 94
  • Number of attempts: 2
Poorly indented Python comments - 1328 entries

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

  • Best score: 15
  • Best player score: 101
  • Position: #208 / 223
  • Number of attempts: 3
Many duplicates - 1459 entries

Quick and easy

  • Best score: 7
  • Best player score: 16
  • Position: #455 / 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: 185
  • Position: #148 / 155
  • Number of attempts: 2
delete swap - 1809 entries

delete all swap

  • Best score: 5
  • Best player score: 12
  • Position: #482 / 564
  • Number of attempts: 1
Generate a very basic Python constructor (fixed) - 1277 entries

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

  • Best score: 29
  • Best player score: 79
  • Position: #248 / 274
  • Number of attempts: 2
Fix the shell script! - 2606 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 58
  • Position: #537 / 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: 91
  • Position: #186 / 206
  • Number of attempts: 1
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: 11
  • Position: #151 / 559
  • Number of attempts: 5
simple replacements - 1829 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 39
  • Position: #381 / 394
  • Number of attempts: 1
swap number pairs - 2128 entries

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

  • Best score: 16
  • Best player score: 30
  • Position: #244 / 388
  • Number of attempts: 1
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: 43
  • Position: #210 / 240
  • Number of attempts: 3
Easy modification of ssh config - 382 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 31
  • Position: #77 / 115
  • Number of attempts: 3
ssh config skills - 258 entries

Parse output from `kuebctl get no -o wide` into an .ssh/config file!

  • Best score: 41
  • Best player score: 98
  • Position: #60 / 66
  • Number of attempts: 1
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: 60
  • Position: #47 / 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: 13
  • Position: #668 / 1114
  • Number of attempts: 3
Add quotes to ansible playbook - 1015 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 8
  • Position: #83 / 319
  • Number of attempts: 6
Multiline to Single Line - 737 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #212 / 313
  • 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: 17
  • Position: #198 / 225
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 779 entries

ThunderLinks are durable hyperlinks to specific email messages generated from Thunderbird in HTML format. Leverage the power of vim to make them suitable for a markdown-formatted file.

  • Best score: 18
  • Best player score: 24
  • Position: #125 / 173
  • Number of attempts: 4
Yo To Hello - 1151 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 12
  • Position: #493 / 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: 21
  • Position: #72 / 261
  • Number of attempts: 9
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: 18
  • Position: #211 / 248
  • Number of attempts: 1
I forgot quotes - 16061 entries

Oops.

  • Best score: 10
  • Best player score: 24
  • Position: #3972 / 4195
  • Number of attempts: 2
Himanshu Tank
Twitter:

entered into 26 challenges

contributed 0 challenges