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

Python Hello World! Reformatting - 825 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 43
  • Number of attempts: 2
Every other line - 2028 entries

AaAaAaA

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 8
-a-b-c- - 2530 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 5
Copy three lines - 1983 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 7
Swap values - 3413 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 6
unknown command - 107 entries

I want change 5 words

  • Best score: 6
  • Best player score: 7
  • Number of attempts: 1
Cool or not? - 369 entries

abc trying to be cool or not...

  • Best score: 15
  • Best player score: 25
  • Number of attempts: 1
Flip the bit - 68 entries

Change the specific 0 to a 1.

  • Best score: 8
  • Best player score: 8
  • Number of attempts: 1
snowflake fractal - 26 entries

From step 0 to step 3 of a fractal

  • Best score: 26
  • Best player score: 40
  • Number of attempts: 1
Don't know what this is - 1711 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 7
Just the middle - 8967 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 4
Collect List - 3399 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 1
Convert Application Output to CSV - 97 entries

Change the application output to comma-separated values

  • Best score: 17
  • Best player score: 19
  • Number of attempts: 2
Add to end of each line... kinda - 263 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
Com(m)a Trouble - 1261 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 4
Shebangs for all - 1574 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 8
remove lines containing the word "reader" - 1259 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
That hyphen - 2125 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 19
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 9368 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Vice versa - 5788 entries

Little role switching.

  • Best score: 2
  • Best player score: 12
  • Number of attempts: 6
V to the i - 3797 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 2
Number Sort - 235 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
One to Ten - 752 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: 12
  • Number of attempts: 6
Almost encrypted - 164 entries

Convert the first paragraph to be even less readable.

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 2
I forgot quotes - 11342 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 8
Words in parens - 10831 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 9
Gray area - 625 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 4
Fun With The Diagonal - 84 entries

change the lowercase characters on the main diagonal to uppercase

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 1
Basic renumbering - 4508 entries

Renumbering Basic.

  • Best score: 2
  • Best player score: 14
  • Number of attempts: 8
Increment each number - 392 entries

Increment each number individually by one

  • Best score: 6
  • Best player score: 15
  • Number of attempts: 2
Simple, Practical, and Common - 23966 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: 2
  • Best player score: 22
  • Number of attempts: 8
One number per line - 12107 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 6
Count both ways - 859 entries

Right AND down.

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 2
Letterbox - 68 entries

Make a box!

  • Best score: 35
  • Best player score: 46
  • Number of attempts: 1
Search and Replace 0 - 4019 entries

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

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 2
readability - 285 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 2
Assign numbers to fields - 82 entries

You are given a list of space-separated strings. Add an increasing numeric prefix to each one.

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 2
Swap values inside brackets - 1325 entries

Easy challenge.

  • Best score: 2
  • Best player score: 15
  • Number of attempts: 4
move titles next to url, in quotes - 243 entries

had trouble with something similar

  • Best score: 19
  • Best player score: 22
  • Number of attempts: 3
Swap the operands under comparison - 203 entries

Swap the operands under comparison to prevent null pointer exception (at least in java)

  • Best score: 7
  • Best player score: 19
  • Number of attempts: 5
simple format - 2347 entries

make it look better.

  • Best score: 20
  • Best player score: 21
  • Number of attempts: 14
multiple cursor alternative - 1029 entries

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

  • Best score: 19
  • Best player score: 22
  • Number of attempts: 2
Two pairs of cluster of letters creates word - 315 entries

Clean and group.

  • Best score: 17
  • Best player score: 23
  • Number of attempts: 1
Build a six - 173 entries

Just enjoy building "a" floors...

  • Best score: 22
  • Best player score: 23
  • Number of attempts: 5
Kolakoski sequence -- level 1 - 36 entries

Generate the Kolakoski sequence as described by its first 75 terms.

  • Best score: 22
  • Best player score: 23
  • Number of attempts: 7
Box it - 1825 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 3
Applying same text modification in several lines - 1456 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 4
  • Best player score: 13
  • Number of attempts: 3
Vim's not included features - 157 entries

Filter not included (-) features in a hypothetical installation of vim.

  • Best score: 23
  • Best player score: 26
  • Number of attempts: 4

Contributed Challenges

Build a six - 173 entries

Just enjoy building "a" floors...

Two pairs of cluster of letters creates word - 315 entries

Clean and group.

Cool or not? - 369 entries

abc trying to be cool or not...

T A
Twitter:

entered into 48 challenges

contributed 3 challenges