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 - 2518 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 / 549
  • Number of attempts: 11
Filter number combinations that don't add to 11 - 401 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 / 114
  • Number of attempts: 4
Tabbed Table to Python Array - 721 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: #82 / 178
  • Number of attempts: 8
Poorly indented Python comments - 1315 entries

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

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

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #94 / 467
  • Number of attempts: 2
Fix the shell script! - 2544 entries

Fix the shell script with the fewest keystrokes!

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

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

  • Best score: 10
  • Best player score: 11
  • Position: #97 / 555
  • Number of attempts: 4
Plotting some variables in python - 1660 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: #258 / 347
  • Number of attempts: 1
Lowercase first characters - 487 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 / 183
  • Number of attempts: 7
Migrated to Postgres! - 323 entries

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

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

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

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

Simple challenge for frequent action while programming.

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

LAMBDA!!!

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

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

  • Best score: 9
  • Best player score: 9
  • Position: #174 / 1095
  • Number of attempts: 4
Satisfy the go linter - 2374 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 / 469
  • Number of attempts: 14
Simple, Practical, and Common - 33586 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 / 7409
  • Number of attempts: 11
One number per line - 18711 entries

Just give me the numbers.

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

On to the next one.

entered into 17 challenges

contributed 0 challenges