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 - 2247 entries

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

  • Best score: 14
  • Best player score: 18
  • Position: #204 / 488
  • Number of attempts: 2
Filter number combinations that don't add to 11 - 376 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: 30
  • Position: #87 / 110
  • Number of attempts: 4
Tabbed Table to Python Array - 643 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: 72
  • Position: #135 / 166
  • Number of attempts: 1
HS exam question - 1504 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 100
  • Position: #318 / 395
  • Number of attempts: 6
Reformat symbols in list - 1466 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 44
  • Position: #274 / 322
  • Number of attempts: 1
Many duplicates - 1253 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #200 / 412
  • Number of attempts: 4
delete swap - 1522 entries

delete all swap

  • Best score: 5
  • Best player score: 7
  • Position: #363 / 476
  • Number of attempts: 2
Fix the shell script! - 2339 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 42
  • Position: #387 / 541
  • Number of attempts: 1
Wikitext headings to markdown - 980 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 38
  • Position: #152 / 203
  • Number of attempts: 3
hello-world-vimgolf - 2353 entries

Simple number generation

  • Best score: 10
  • Best player score: 12
  • Position: #399 / 665
  • Number of attempts: 3
Contribute to keyboard mashing - 839 entries

Speak in tongues

  • Best score: 17
  • Best player score: 20
  • Position: #191 / 256
  • Number of attempts: 4
Fill in the chess board - 905 entries

Fill in the name of each square using its file (a-h) and rank (1-8).

  • Best score: 19
  • Best player score: 48
  • Position: #129 / 175
  • Number of attempts: 7
Make list of numbers from 1 to 30 more compact, but more confusing - 90 entries

Change the naming logic of numbers to end up with less lines.

  • Best score: 74
  • Best player score: 104
  • Position: #15 / 36
  • Number of attempts: 1
Migrated to Postgres! - 312 entries

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

  • Best score: 26
  • Best player score: 35
  • Position: #96 / 122
  • Number of attempts: 3
Making 3 line function a one liner. - 305 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #61 / 194
  • Number of attempts: 2
Add quotes to ansible playbook - 930 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 9
  • Position: #157 / 296
  • Number of attempts: 4
Simple, Practical, and Common - 33385 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: 29
  • Position: #4722 / 7364
  • Number of attempts: 2
Box it - 7827 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 26
  • Position: #1043 / 1864
  • Number of attempts: 6
Cool or not? - 793 entries

abc trying to be cool or not...

  • Best score: 15
  • Best player score: 19
  • Position: #135 / 226
  • Number of attempts: 3
multiple cursor alternative - 1474 entries

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

  • Best score: 19
  • Best player score: 23
  • Position: #253 / 376
  • Number of attempts: 1
From argument to object - 1474 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 26
  • Position: #417 / 450
  • Number of attempts: 1
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #982 / 4164
  • Number of attempts: 8
For all cases. - 141 entries

In this case... change it! :) Watch the line.

  • Best score: 8
  • Best player score: 8
  • Position: #51 / 100
  • Number of attempts: 1
Missing Library and a Typo - 856 entries

I forgot to add a c library, please add it for me. Also I'm bad at typing so fix my typo too.

  • Best score: 15
  • Best player score: 22
  • Position: #172 / 209
  • Number of attempts: 1
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3227 / 4161
  • Number of attempts: 2
⚫ hgtp://Shifor 🛠️
Twitter:

Engineering Gnome. CTO & Co-Founder of @EnterTheVoidNFT. #HGTP #NFGP #AppsNotApes #Apes2Apps

entered into 25 challenges

contributed 0 challenges