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

Simple, Practical, and Common - 33621 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: 30
  • Position: #5067 / 7422
  • Number of attempts: 1
One number per line - 18732 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 23
  • Position: #2797 / 3865
  • Number of attempts: 1
Separate the lines - 182 entries

Every other line is mixed up. Separate them into their original texts.

  • Best score: 11
  • Best player score: 11
  • Position: #10 / 92
  • Number of attempts: 2
Split line with dots - 2144 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 20
  • Position: #355 / 634
  • Number of attempts: 1
From argument to object - 1508 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 19
  • Position: #274 / 458
  • Number of attempts: 1
Every other line - 2910 entries

AaAaAaA

  • Best score: 12
  • Best player score: 17
  • Position: #413 / 703
  • Number of attempts: 2
Array propagate - 338 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 26
  • Position: #55 / 119
  • Number of attempts: 2
Start coding format - 155 entries

I used to start coding with following format: int main(){ -(cursor here) }

  • Best score: 22
  • Best player score: 24
  • Position: #41 / 72
  • Number of attempts: 2
comment and uncomment code inline - 1122 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 12
  • Position: #230 / 322
  • Number of attempts: 1
Todo list specification - 399 entries

The every item on the todo list must be done today. Modify the list to reflect that.

  • Best score: 37
  • Best player score: 39
  • Position: #105 / 179
  • Number of attempts: 1
For all cases. - 161 entries

In this case... change it! :) Watch the line.

  • Best score: 8
  • Best player score: 8
  • Position: #8 / 106
  • Number of attempts: 1
Simple addition - 326 entries

The right side of the equation is already there. We just need the left one now.

  • Best score: 12
  • Best player score: 14
  • Position: #81 / 122
  • Number of attempts: 1
Interactive git rebase changing commands - 172 entries

How to change the action of some commits in git rebase dialog.

  • Best score: 14
  • Best player score: 17
  • Position: #69 / 79
  • Number of attempts: 1
Create a table - 332 entries

Convert the given input into a formatted table

  • Best score: 16
  • Best player score: 18
  • Position: #59 / 105
  • Number of attempts: 5
Fiddle percentages into real numbers - 865 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 14
  • Position: #168 / 291
  • Number of attempts: 2
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: 10
  • Position: #92 / 140
  • Number of attempts: 1
One to Ten - 2219 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 14
  • Position: #404 / 672
  • Number of attempts: 1
Add Go XML to structure tags - 170 entries

The Go programming language can directly map XML to structure fields. Add the correct XML tag after each field.

  • Best score: 23
  • Best player score: 31
  • Position: #47 / 69
  • Number of attempts: 1
Array transposition - 2417 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 30
  • Position: #369 / 448
  • Number of attempts: 1
AleksandarTrifunovic
Twitter:

entered into 19 challenges

contributed 0 challenges