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 - 32962 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: 28
  • Position: #4350 / 7276
  • Number of attempts: 2
One number per line - 18395 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 24
  • Position: #3189 / 3793
  • Number of attempts: 1
Add semicolons - 10545 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #982 / 2989
  • Number of attempts: 3
Extract wireshark capture filter - 181 entries

Extract wireshark capture filter from IP plan

  • Best score: 25
  • Best player score: 44
  • Position: #55 / 59
  • Number of attempts: 1
Tables, Functions, Sprocs - 116 entries

In order to load some scripts into my database in the correct order I need to load tables first (t_), then functions (fn_), then stored procedures (sp_). The order of the t_ lines and the order of the sp_ lines should also match. Reorder the lines so they will load correctly.

  • Best score: 10
  • Best player score: 11
  • Position: #25 / 39
  • Number of attempts: 3
Search and Replace 0 - 4681 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #997 / 1550
  • Number of attempts: 2
That hyphen - 2500 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 17
  • Position: #629 / 683
  • Number of attempts: 1
comment and uncomment code inline - 995 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: 11
  • Position: #207 / 296
  • Number of attempts: 3
Join 'em - 229 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 6
  • Position: #126 / 135
  • Number of attempts: 1
-a-b-c- - 3118 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Position: #842 / 1112
  • Number of attempts: 2
Don't know what this is - 1951 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: 16
  • Position: #526 / 572
  • Number of attempts: 1
citizen_hacks_2019_challenge1 - 38 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 5
  • Best player score: 5
  • Position: #1 / 32
  • Number of attempts: 1
replacing each line of a block selection - 2816 entries

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

  • Best score: 18
  • Best player score: 28
  • Position: #585 / 736
  • Number of attempts: 2
Hans Lidiki
Twitter:

entered into 13 challenges

contributed 0 challenges