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

Filename Flip - 196 entries

Rearrange the MP3 filenames so that the identifier comes before the name.

  • Best score: 15
  • Best player score: 16
  • Position: #14 / 70
  • Number of attempts: 7
Filling braces - 481 entries

Inspired by a question on CoDidact (https://software.codidact.com/posts/296501), I wondered if Vim could offer a satisfactory ‘solution’ to this problem.

  • Best score: 21
  • Best player score: 24
  • Position: #33 / 157
  • Number of attempts: 13
Rearrange array to single level - 1832 entries

The goal is to flatten the array into a single list and remove any empty elements.

  • Best score: 14
  • Best player score: 21
  • Position: #90 / 308
  • Number of attempts: 6
Rearrange array to one line - 907 entries

Rearrange the array content on only one line, and remove trailing commas

  • Best score: 13
  • Best player score: 50
  • Position: #188 / 209
  • Number of attempts: 3
Plotting some variables in python - 1693 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 56
  • Position: #248 / 355
  • Number of attempts: 6
Rural Post - 4604 entries

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

  • Best score: 7
  • Best player score: 10
  • Position: #269 / 1126
  • Number of attempts: 9
Satisfy the go linter - 2504 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: 20
  • Position: #11 / 509
  • Number of attempts: 12
Simple, Practical, and Common - 34031 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 22
  • Position: #2218 / 7520
  • Number of attempts: 10
prepend * to every non-blank line - 6401 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 7
  • Best player score: 12
  • Position: #776 / 1566
  • Number of attempts: 1
Add semicolons - 10966 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 17
  • Position: #2600 / 3100
  • Number of attempts: 3
Wrap the text of an email message to 79 characters - 885 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #251 / 458
  • Number of attempts: 6
Search and Replace 0 - 5170 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 7
  • Best player score: 18
  • Position: #1456 / 1680
  • Number of attempts: 1
Remove semicolons after expressions - 690 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Position: #108 / 272
  • Number of attempts: 7
switch variable - 5136 entries

how fast can you switch two variable ?

  • Best score: 9
  • Best player score: 11
  • Position: #596 / 1767
  • Number of attempts: 8
Ruby 1.9 hashes - 1315 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 20
  • Position: #386 / 421
  • Number of attempts: 6
Increment, increment, increment.... - 712 entries

Vim likes macros

  • Best score: 10
  • Best player score: 10
  • Position: #31 / 420
  • Number of attempts: 5
Sort and add attributes - 1605 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #231 / 622
  • Number of attempts: 5
Michael
Twitter:

entered into 17 challenges

contributed 0 challenges