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

Find fix point of cos - 1158 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 15
  • Position: #71 / 350
  • Number of attempts: 4
Insert column data on Confluence-style table - 437 entries

Add ip addresses into new "IP" column based on the last digits from the "Server" column

  • Best score: 33
  • Best player score: 110
  • Position: #97 / 102
  • Number of attempts: 1
Surround the 'z' character with brackets, quotes, and print as formatted string. - 494 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 17
  • Position: #56 / 278
  • Number of attempts: 4
Paste a column after a column - 2310 entries

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

  • Best score: 14
  • Best player score: 14
  • Position: #50 / 500
  • Number of attempts: 11
Filter number combinations that don't add to 11 - 377 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: #16 / 111
  • Number of attempts: 10
Tabbed Table to Python Array - 645 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: 53
  • Position: #32 / 167
  • Number of attempts: 8
HS exam question - 1517 entries

Convert the data to a python dictionary

  • Best score: 12
  • Best player score: 55
  • Position: #75 / 400
  • Number of attempts: 9
Reformat symbols in list - 1477 entries

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

  • Best score: 24
  • Best player score: 24
  • Position: #42 / 327
  • Number of attempts: 13
Fizzbuzz - 511 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 48
  • Position: #23 / 157
  • Number of attempts: 12
Substraction (bis) - 579 entries

Solve the equations (adapted from the original @Caek_'s challenge).

  • Best score: 21
  • Best player score: 71
  • Position: #90 / 108
  • Number of attempts: 7
Changing around text with citations - 323 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 154
  • Position: #87 / 89
  • Number of attempts: 1
Many duplicates - 1284 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #226 / 421
  • Number of attempts: 5
delete swap - 1574 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #247 / 493
  • Number of attempts: 7
Visual block training - 1025 entries

You see the input. You see the output. Go.

  • Best score: 17
  • Best player score: 18
  • Position: #36 / 190
  • Number of attempts: 24
Innocent Monster - 164 entries

You have the tools, just create him!

  • Best score: 60
  • Best player score: 84
  • Position: #25 / 47
  • Number of attempts: 4
Put a newline after every 10 lines in vim - 1600 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #171 / 534
  • Number of attempts: 6
hello-world-vimgolf - 2394 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #270 / 680
  • Number of attempts: 4
Compile C - 365 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 19
  • Position: #22 / 132
  • Number of attempts: 2
Sort and add attributes - 1336 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #259 / 533
  • Number of attempts: 4
Reconstruct the Sentence - 1382 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 20
  • Best player score: 20
  • Position: #126 / 388
  • Number of attempts: 7
Braces or Brackets? - 895 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 43
  • Position: #130 / 291
  • Number of attempts: 2
Whitespace, empty lines and tabs - 3362 entries

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

  • Best score: 16
  • Best player score: 22
  • Position: #307 / 740
  • Number of attempts: 5
Flodder-challenge - 1121 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 32
  • Position: #93 / 312
  • Number of attempts: 8
Simple text editing with Vim - 12341 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 20
  • Position: #2759 / 3595
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 6622 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 32
  • Best player score: 36
  • Position: #469 / 1629
  • Number of attempts: 13
Golf Vim
Twitter2:

entered into 25 challenges

contributed 0 challenges