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

Fill visual area - 70 entries

Just have fun!

  • Best score: 20
  • Best player score: 35
  • Number of attempts: 2
Saving the hashes(#) - 1770 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: 2
7th Birthday - 163 entries

We have a bunch of numbers written from 0 to 9 in the order present in the text input file. The task is to create 7 by replacing the numbers with dashes.

  • Best score: 19
  • Best player score: 23
  • Number of attempts: 2
Separating firstname & lastname - 102 entries

Seperate named with equal tabs.

  • Best score: 19
  • Best player score: 21
  • Number of attempts: 4
Start coding format - 119 entries

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

  • Best score: 22
  • Best player score: 24
  • Number of attempts: 3
Sort files from hosts - 129 entries

Resume files by host. I hope you enjoy with this challenge

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 3
Mirror Symmetry - 701 entries

Add backslashes.

  • Best score: 7
  • Best player score: 10
  • Number of attempts: 6
Order and join - 756 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 4
Don't know what this is - 1769 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: 12
  • Number of attempts: 5
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: 1
V to the i - 3975 entries

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

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 5
Switch function arguments - 1843 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 4
replace 2nd column blanks with values in same column if blank - 183 entries

Where ,SOMELOGB and ,SOMELOGC replaces each /r carriage return if 2nd column is blank. The replace only happens if 2nd column is blank though and should replace up to the non blank row.

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 3
Whitespace, empty lines and tabs - 2557 entries

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

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 9
From A to B - 496 entries

Mirror and change this text block

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 3
Marcin
Twitter:

entered into 15 challenges

contributed 0 challenges