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

Reorganize Pokémon - 37 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 21
  • Position: #9 / 12
  • Number of attempts: 2
Move list of uuids into a SQL query - 39 entries

Take the list of UUIDs and use them as a filter in the where statement of a SQL query

  • Best score: 57
  • Best player score: 63
  • Position: #4 / 18
  • Number of attempts: 6
Markdown Blog Editing - 197 entries

Convert the given link text in start file to a markdown link list.

  • Best score: 30
  • Best player score: 53
  • Position: #32 / 52
  • Number of attempts: 1
Word completion - 116 entries

Try to complete these options within 20 keystrokes.

  • Best score: 20
  • Best player score: 21
  • Position: #8 / 37
  • Number of attempts: 7
Rearrange array to single level - 1092 entries

The goal is to flatten the array into a single list and remove any empty elements.

  • Best score: 14
  • Best player score: 19
  • Position: #48 / 184
  • Number of attempts: 4
Format a long line - 71 entries

Reformat long lines (gq), textwidth=78, no trailing spaces.

  • Best score: 17
  • Best player score: 18
  • Position: #10 / 25
  • Number of attempts: 5
months to html list items - 957 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 23
  • Position: #47 / 254
  • Number of attempts: 3
Quicksort - 1875 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 6
  • Position: #124 / 411
  • Number of attempts: 7
Tic-Tac-Toe Grid Transformation - 381 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: 56
  • Best player score: 153
  • Position: #59 / 82
  • Number of attempts: 4
Find fix point of cos - 1339 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: 14
  • Position: #74 / 390
  • Number of attempts: 3
Reformat symbols in list - 1606 entries

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

  • Best score: 24
  • Best player score: 24
  • Position: #65 / 344
  • Number of attempts: 11
Many duplicates - 1443 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #316 / 467
  • Number of attempts: 4
hello-world-vimgolf - 2490 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #342 / 705
  • Number of attempts: 4
Simple, Practical, and Common - 33571 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: #2405 / 7405
  • Number of attempts: 8
Prime Numbers - 354 entries

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 153
  • Position: #86 / 104
  • Number of attempts: 7
Swap the operands under comparison - 297 entries

Swap the operands under comparison to prevent null pointer exception (at least in java)

  • Best score: 19
  • Best player score: 25
  • Position: #73 / 101
  • Number of attempts: 1
Add semicolons - 10845 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1779 / 3060
  • Number of attempts: 2
remove lines containing the word "reader" - 3574 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #859 / 1158
  • Number of attempts: 1
Box it - 7902 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Position: #814 / 1874
  • Number of attempts: 4
Extract argument from function - 2355 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 20
  • Position: #703 / 752
  • Number of attempts: 1
Just the middle - 11423 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3204 / 4185
  • Number of attempts: 2
convert yml into java pojo field - 857 entries

How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file

  • Best score: 29
  • Best player score: 32
  • Position: #161 / 227
  • Number of attempts: 1
I forgot quotes - 15967 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #2041 / 4174
  • Number of attempts: 4
Letter case trickery - 1621 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 11
  • Position: #290 / 516
  • Number of attempts: 2
Ruby 1.9 hashes - 1236 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 12
  • Position: #114 / 404
  • Number of attempts: 8
Shebangs for all - 1975 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 12
  • Position: #164 / 508
  • Number of attempts: 12
Reconstruct the Sentence - 1477 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: 24
  • Position: #307 / 405
  • Number of attempts: 7
Whitespace, empty lines and tabs - 3589 entries

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

  • Best score: 16
  • Best player score: 22
  • Position: #325 / 775
  • Number of attempts: 5
Simple text editing with Vim - 12680 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1974 / 3665
  • Number of attempts: 4
Adi
Github:

entered into 29 challenges

contributed 0 challenges