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

Tic-Tac-Toe Grid Transformation - 14 entries

Your mission is to efficiently convert the original Tic-Tac-Toe grid, represented by 'x's and 'o's, into a neat and well-organized game board.

  • Best score: 58
  • Best player score: 202
  • Position: #11 / 12
  • Number of attempts: 2
Find fix point of cos - 661 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: #40 / 185
  • Number of attempts: 4
Insert column data on Confluence-style table - 264 entries

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

  • Best score: 33
  • Best player score: 63
  • Position: #46 / 67
  • Number of attempts: 3
Surround the 'z' character with brackets, quotes, and print as formatted string. - 336 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #23 / 176
  • Number of attempts: 3
Paste a column after a column - 1690 entries

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

  • Best score: 14
  • Best player score: 20
  • Position: #195 / 370
  • Number of attempts: 3
Filter number combinations that don't add to 11 - 249 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: 28
  • Position: #40 / 81
  • Number of attempts: 5
Tabbed Table to Python Array - 491 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: 67
  • Position: #101 / 138
  • Number of attempts: 2
HS exam question - 1277 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 82
  • Position: #227 / 348
  • Number of attempts: 1
Reformat symbols in list - 1216 entries

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

  • Best score: 24
  • Best player score: 41
  • Position: #221 / 275
  • Number of attempts: 1
Many duplicates - 1054 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #214 / 343
  • Number of attempts: 7
2 quick changes and a numbered list - 508 entries

The ascii will not be lost, but rather numbered in 4 digit blocks with leading zeros.

  • Best score: 37
  • Best player score: 78
  • Position: #107 / 123
  • Number of attempts: 1
delete swap - 1279 entries

delete all swap

  • Best score: 5
  • Best player score: 11
  • Position: #341 / 405
  • Number of attempts: 3
Fix the shell script! - 1857 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 62
  • Position: #400 / 451
  • Number of attempts: 1
Visual block training - 846 entries

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

  • Best score: 17
  • Best player score: 80
  • Position: #140 / 156
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1433 entries

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

  • Best score: 10
  • Best player score: 14
  • Position: #387 / 482
  • Number of attempts: 2
hello-world-vimgolf - 2136 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #273 / 604
  • Number of attempts: 7
Fill in the chess board - 790 entries

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

  • Best score: 19
  • Best player score: 60
  • Position: #135 / 162
  • Number of attempts: 3
Search and Replace 0 - 4766 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 12
  • Position: #714 / 1578
  • Number of attempts: 3
Reverse characters in a line - 701 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 24
  • Position: #217 / 248
  • Number of attempts: 4
Simple text editing with Vim - 11979 entries

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

  • Best score: 13
  • Best player score: 19
  • Position: #2613 / 3509
  • Number of attempts: 1
djheidihoe
Twitter:

entered into 20 challenges

contributed 0 challenges