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

comment and uncomment code inline - 931 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
  • Number of attempts: 3
citizen_hacks_2019_challenge1 - 28 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
Join 'em - 191 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 6
  • Number of attempts: 1
Tables, Functions, Sprocs - 88 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
  • Number of attempts: 3
Search and Replace 0 - 4434 entries

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

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 2
-a-b-c- - 2863 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 2
Extract wireshark capture filter - 150 entries

Extract wireshark capture filter from IP plan

  • Best score: 26
  • Best player score: 44
  • Number of attempts: 1
One number per line - 16262 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 24
  • Number of attempts: 1
Add semicolons - 7755 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 3
That hyphen - 2376 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 17
  • Number of attempts: 1
replacing each line of a block selection - 2682 entries

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

  • Best score: 18
  • Best player score: 28
  • Number of attempts: 2
Don't know what this is - 1867 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
  • Number of attempts: 1
Simple, Practical, and Common - 29826 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
  • Number of attempts: 2
Hans Lidiki
Twitter:

entered into 13 challenges

contributed 0 challenges