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

months to html list items - 569 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 28
  • Position: #107 / 159
  • Number of attempts: 2
Tic-Tac-Toe Grid Transformation - 321 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: 193
  • Position: #68 / 78
  • Number of attempts: 2
Remove line numbers - 543 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 12
  • Best player score: 13
  • Position: #76 / 146
  • Number of attempts: 9
HS exam question - 1510 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 87
  • Position: #285 / 397
  • Number of attempts: 3
Reformat symbols in list - 1470 entries

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

  • Best score: 24
  • Best player score: 36
  • Position: #219 / 323
  • Number of attempts: 7
Fizzbuzz - 510 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 74
  • Position: #70 / 157
  • Number of attempts: 2
Many duplicates - 1253 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #315 / 412
  • Number of attempts: 3
Generate a very basic Python constructor (fixed) - 1179 entries

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

  • Best score: 29
  • Best player score: 60
  • Position: #207 / 248
  • Number of attempts: 2
Visual block training - 1005 entries

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

  • Best score: 17
  • Best player score: 38
  • Position: #105 / 185
  • Number of attempts: 3
Put a newline after every 10 lines in vim - 1578 entries

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

  • Best score: 10
  • Best player score: 14
  • Position: #419 / 525
  • Number of attempts: 3
hello-world-vimgolf - 2361 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #241 / 667
  • Number of attempts: 5
Plotting some variables in python - 1567 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: 44
  • Position: #161 / 334
  • Number of attempts: 2
simple replacements - 1662 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 24
  • Position: #217 / 371
  • Number of attempts: 3
Inverting Lines - 1837 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 16
  • Position: #395 / 498
  • Number of attempts: 4
Generate a very basic Python constructor - 309 entries

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

  • Best score: 38
  • Best player score: 93
  • Position: #88 / 95
  • Number of attempts: 4
Python dataclasses - 1105 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 32
  • Position: #220 / 278
  • Number of attempts: 2
RUST Cargo.toml version to last - 320 entries

RUST Cargo.toml version to last. rusty practice on vimgolf

  • Best score: 16
  • Best player score: 43
  • Position: #92 / 95
  • Number of attempts: 2
Making 3 line function a one liner. - 306 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #119 / 195
  • Number of attempts: 3
Prime Numbers - 344 entries

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 40
  • Position: #32 / 102
  • Number of attempts: 2
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Position: #2511 / 3044
  • Number of attempts: 2
Search and Replace 0 - 4792 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1101 / 1585
  • Number of attempts: 3
Number Sort - 305 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

  • Best score: 9
  • Best player score: 9
  • Position: #133 / 163
  • Number of attempts: 4
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3180 / 4164
  • Number of attempts: 3
Change attribute to getter - 133 entries

Wrap attributes with a getter method.

  • Best score: 24
  • Best player score: 33
  • Position: #52 / 57
  • Number of attempts: 1
VimGolfNight - 536 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 16
  • Position: #319 / 343
  • Number of attempts: 3
Condensed Cases - 788 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 31
  • Position: #236 / 242
  • Number of attempts: 5
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3381 / 4161
  • Number of attempts: 2
quotes inside quotes - 3125 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 22
  • Position: #1028 / 1072
  • Number of attempts: 3
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1165 / 3946
  • Number of attempts: 5
Alphabet soup - 419 entries

Create a column of all alphabet characters organized in a funky way

  • Best score: 25
  • Best player score: 40
  • Position: #79 / 103
  • Number of attempts: 4
Reverse and count - 456 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

  • Best score: 18
  • Best player score: 70
  • Position: #170 / 172
  • Number of attempts: 2
Reverse Simple Deletion - 832 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Position: #56 / 454
  • Number of attempts: 4
@grhkm@infosec.exchange
Twitter:

There’s only one me

entered into 32 challenges

contributed 0 challenges