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 - 2170 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 / 464
  • Number of attempts: 11
Filter number combinations that don't add to 11 - 357 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 / 106
  • Number of attempts: 4
Tabbed Table to Python Array - 608 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: #72 / 160
  • Number of attempts: 8
Poorly indented Python comments - 1149 entries

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

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

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #87 / 397
  • Number of attempts: 2
Fix the shell script! - 2064 entries

Fix the shell script with the fewest keystrokes!

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

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

  • Best score: 10
  • Best player score: 11
  • Position: #92 / 518
  • Number of attempts: 4
Plotting some variables in python - 1543 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: #245 / 329
  • Number of attempts: 1
Lowercase first characters - 458 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 / 172
  • Number of attempts: 7
Migrated to Postgres! - 299 entries

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

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

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

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

Simple challenge for frequent action while programming.

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

LAMBDA!!!

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

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

  • Best score: 9
  • Best player score: 9
  • Position: #174 / 1066
  • Number of attempts: 4
Satisfy the go linter - 2169 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 / 434
  • Number of attempts: 14
Simple, Practical, and Common - 33353 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 / 7358
  • Number of attempts: 11
One number per line - 18613 entries

Just give me the numbers.

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

On to the next one.

entered into 17 challenges

contributed 0 challenges