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

Make HTML List - 891 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 50
  • Number of attempts: 1
ASCII box - 295 entries

Don't forget to fix typos!

  • Best score: 23
  • Best player score: 23
  • Number of attempts: 7
Simple, Practical, and Common - 25288 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
  • Number of attempts: 8
Mess in revision history - 977 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 22
  • Number of attempts: 7
Box it - 3173 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Number of attempts: 10
Vice versa - 5989 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 8
camel riding - 691 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 4
Reorder the groups - 460 entries

Change the order so that the groups of fruit come before the vegetables.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 6
remove dupes from array - 1195 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 20
  • Number of attempts: 2
switch variable - 4316 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Extract argument from function - 2010 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 23
  • Number of attempts: 1
Add semicolons - 2050 entries

Simply add a semicolon at the end of each line

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

easy stuff

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 6
I forgot quotes - 11947 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 6
Song Transcription Oops - 98 entries

When transcribing vocal music to Canjo Tab you can start by finding the lowest note and assigning that to zero and working your way up from there. However, without fail, I tend to miscount the notes and when I am near done I find a lower note. I mark this with a "z". This means I have to increase all the previous ones by 1. just a sting of numbers :)

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 12
Just the middle - 9314 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 3
Words in parens - 11092 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 5
V to the i - 3951 entries

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

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 4
change parenthesis - 138 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
quotes inside quotes - 2793 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: 17
  • Number of attempts: 1
replacing each line of a block selection - 2528 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 19
  • Number of attempts: 8
simple format - 3066 entries

make it look better.

  • Best score: 20
  • Best player score: 20
  • Number of attempts: 11
A HAPPY NEW YEAR 2014 ! - 9542 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 6
Unsemantic linewrapping - 181 entries

[Inspired by a blog post I read: https://scott.mn/2014/02/21/semantic_linewrapping/. Text adapted.] Sometimes when editing a Markdown file, I wrap the lines semantically. Instead of inserting a newline at 70 columns (or whatever), or making paragraphs one long line, I put in newlines at a point that seems logical to me. This may seem silly, but it produces better diffs. Semantic linewrapping also makes editing snappier. I can delete, edit or insert sentences easily using linewise operations. Code-oriented text editors like Vim and [REDACTED] are really good at this kind of manipulation. Editing text that hasn't been wrapped semantically is a pain, though:

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 9
Add to end of each line... kinda - 264 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: 4
Simple text editing with Vim - 10457 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 6
One number per line - 12988 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 13
Bad Copy Syntax - 482 entries

Copy should be from right to left, but sometimes you type it wrong.

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 9
Martin Delille
Twitter:

Founding member of OpenAPI Generator

entered into 28 challenges

contributed 0 challenges