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

Paste a column after a column - 2407 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 14
  • Best player score: 14
  • Position: #14 / 521
  • Number of attempts: 11
Filter number combinations that don't add to 11 - 379 entries

Append the sum of each line to its end, alongside an equals sign, and remove any that do not sum to 11. The ordering of lines should stay the same. Note that the combinations are semi-arbitrary and not all 4-number combinations are present in the file.

  • Best score: 27
  • Best player score: 27
  • Position: #7 / 112
  • Number of attempts: 4
Tabbed Table to Python Array - 652 entries

Not payed by the hour? So make it fast ;-) The table contains the relative occurencies of bigrams (two consecutive letters) in 1/100,000 in the german language, copy-pasted from http://www.mathe.tu-freiberg.de/~hebisch/cafe/kryptographie/bigramme.html

  • Best score: 50
  • Best player score: 60
  • Position: #77 / 171
  • Number of attempts: 8
Poorly indented Python comments - 1274 entries

Fix the alignment of some Python comments as quickly as possible.

  • Best score: 15
  • Best player score: 15
  • Position: #10 / 212
  • Number of attempts: 13
Many duplicates - 1333 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #91 / 436
  • Number of attempts: 2
Fix the shell script! - 2421 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 26
  • Position: #5 / 562
  • Number of attempts: 6
Put a newline after every 10 lines in vim - 1646 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 11
  • Position: #97 / 548
  • Number of attempts: 4
Plotting some variables in python - 1604 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 59
  • Position: #256 / 344
  • Number of attempts: 1
Lowercase first characters - 482 entries

This is the (abridged) input for Day 3 in Advent of Code 2019. The output is a format more suitable for Prolog programming: the two lines of input become two lists of pairs, joined together in a wires functor.

  • Best score: 33
  • Best player score: 33
  • Position: #20 / 180
  • Number of attempts: 7
Migrated to Postgres! - 321 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

  • Best score: 26
  • Best player score: 26
  • Position: #10 / 125
  • Number of attempts: 3
Generate a very basic Python constructor - 315 entries

I actually needed to do this myself, so I look forward to learning how.

  • Best score: 38
  • Best player score: 38
  • Position: #20 / 97
  • Number of attempts: 12
Making 3 line function a one liner. - 312 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #80 / 200
  • Number of attempts: 1
Python: Def to Lambda - 441 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #55 / 154
  • Number of attempts: 3
Rural Post - 4424 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 9
  • Position: #174 / 1085
  • Number of attempts: 4
Satisfy the go linter - 2359 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 20
  • Position: #122 / 464
  • Number of attempts: 14
Simple, Practical, and Common - 33482 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: 22
  • Position: #1184 / 7384
  • Number of attempts: 11
One number per line - 18672 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1179 / 3852
  • Number of attempts: 2
Brett Bender
Twitter:

On to the next one.

entered into 17 challenges

contributed 0 challenges