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

Execute immediate SQL - 77 entries

Sql string tranformation ...

  • Best score: 60
  • Best player score: 84
  • Number of attempts: 1
Refactor arguments into object argument - 157 entries

A relatively common Javascript refactoring.

  • Best score: 48
  • Best player score: 72
  • Number of attempts: 1
replacing each line of a block selection - 2604 entries

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

  • Best score: 18
  • Best player score: 29
  • Number of attempts: 1
Saving the hashes(#) - 1806 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 27
  • Number of attempts: 4
Whitespace, empty lines and tabs - 2604 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 36
  • Number of attempts: 1
Prefixes and suffixes - 510 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 26
  • Number of attempts: 1
Parsing with CSV: Unify lines and result. - 162 entries

col1;col2;col3;col4 A;1;4;5 A;3;4; A;1;4; # New output: col1;col2;col3;col4 A;1(2x);3;4(3x);5 any ideas?

  • Best score: 21
  • Best player score: 25
  • Number of attempts: 1
Simple text editing with Vim - 10708 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: 8
Words in parens - 11449 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 4
lamb had a little Mary - 507 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 39
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 9782 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
A simple change - 362 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 2
Block Fun 1 - 158 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 24
  • Number of attempts: 1
abcd > a b c d - 241 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
Swap assigned value - 500 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 3
-a-b-c- - 2732 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 3
Groups magic - 136 entries

Regexp or macros for string converting: (a) -> ___ (abc) -> ____ (abcd) -> ______ All in the '(' replace to _ multiply by char count + ()

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 3
That hyphen - 2263 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 17
  • Number of attempts: 1
CY
Twitter:

entered into 18 challenges

contributed 0 challenges