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

Box it - 6826 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 24
  • Number of attempts: 1
Happy TvvO - 367 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
Mirrored text - 157 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 2
Whitespace, empty lines and tabs - 2733 entries

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

  • Best score: 16
  • Best player score: 31
  • Number of attempts: 3
Remove noise from HTTP log - 628 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 1
Python Hello World! Reformatting - 859 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 44
  • Number of attempts: 1
Bad Copy Syntax - 1733 entries

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

  • Best score: 10
  • Best player score: 20
  • Number of attempts: 6
Context Insensitive completion 1 - 405 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 36
  • Number of attempts: 2
Mute the second method of this script - 418 entries

prepend a # infront of every line of the second method

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 1
Logging with key - 280 entries

Sometimes it is better to log with meaningful key

  • Best score: 21
  • Best player score: 38
  • Number of attempts: 1
camel riding - 731 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 2
Letter case trickery - 1481 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 12
  • Number of attempts: 4
Swap assigned value - 525 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 1
prepend * to every non-blank line - 4429 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 16
  • Number of attempts: 1
Swap values inside brackets - 2257 entries

Easy challenge.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 4
Simple text editing with Vim - 11152 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: 2
Number Sort - 265 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 1
Start coding format - 128 entries

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

  • Best score: 22
  • Best player score: 24
  • Number of attempts: 1
Preferably without multi-cursor plugin - 368 entries

Originally asked as question on reddit by kpthunder: https://www.reddit.com/r/vim/comments/9fvsro/what_is_the_most_efficient_way_to_go_about/

  • Best score: 30
  • Best player score: 37
  • Number of attempts: 1
Increment, increment, increment.... - 524 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 3
Simple, Practical, and Common - 31316 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: 26
  • Number of attempts: 2
Marius Jurgelenas
Twitter:

entered into 21 challenges

contributed 0 challenges