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

Turn the months into list items.

  • Best score: 22
  • Best player score: 28
  • Position: #171 / 274
  • Number of attempts: 2
Tic-Tac-Toe Grid Transformation - 396 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: #73 / 83
  • Number of attempts: 2
Remove line numbers - 736 entries

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

  • Best score: 9
  • Best player score: 13
  • Position: #100 / 198
  • Number of attempts: 9
HS exam question - 1589 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 87
  • Position: #300 / 417
  • Number of attempts: 3
Reformat symbols in list - 1621 entries

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

  • Best score: 24
  • Best player score: 36
  • Position: #237 / 348
  • Number of attempts: 7
Fizzbuzz - 573 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 74
  • Position: #76 / 168
  • Number of attempts: 2
Many duplicates - 1445 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #359 / 468
  • Number of attempts: 3
Generate a very basic Python constructor (fixed) - 1253 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: #224 / 271
  • Number of attempts: 2
Visual block training - 1070 entries

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

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

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

  • Best score: 10
  • Best player score: 14
  • Position: #445 / 556
  • Number of attempts: 3
hello-world-vimgolf - 2499 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #241 / 708
  • Number of attempts: 5
Plotting some variables in python - 1661 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: #167 / 348
  • Number of attempts: 2
simple replacements - 1753 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 24
  • Position: #223 / 380
  • Number of attempts: 3
Inverting Lines - 1900 entries

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

  • Best score: 10
  • Best player score: 16
  • Position: #406 / 511
  • Number of attempts: 4
Generate a very basic Python constructor - 316 entries

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

  • Best score: 38
  • Best player score: 93
  • Position: #90 / 98
  • Number of attempts: 4
Python dataclasses - 1136 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 32
  • Position: #224 / 284
  • Number of attempts: 2
RUST Cargo.toml version to last - 355 entries

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

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

Simple challenge for frequent action while programming.

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

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 40
  • Position: #33 / 105
  • Number of attempts: 2
Add semicolons - 10852 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Position: #2526 / 3063
  • Number of attempts: 2
Search and Replace 0 - 4989 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1133 / 1624
  • Number of attempts: 3
Number Sort - 314 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 / 166
  • Number of attempts: 4
Just the middle - 11454 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3184 / 4197
  • Number of attempts: 3
Change attribute to getter - 140 entries

Wrap attributes with a getter method.

  • Best score: 24
  • Best player score: 33
  • Position: #53 / 59
  • Number of attempts: 1
VimGolfNight - 560 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 16
  • Position: #323 / 347
  • Number of attempts: 3
Condensed Cases - 804 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: #240 / 247
  • Number of attempts: 5
I forgot quotes - 15983 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3392 / 4180
  • Number of attempts: 2
quotes inside quotes - 3159 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: #1033 / 1078
  • Number of attempts: 3
Words in parens - 12935 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1169 / 3963
  • Number of attempts: 5
Alphabet soup - 429 entries

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

  • Best score: 25
  • Best player score: 40
  • Position: #81 / 108
  • Number of attempts: 4
Reverse and count - 473 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: #174 / 176
  • Number of attempts: 2
Reverse Simple Deletion - 847 entries

You did the simple deletion, now reverse it.

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

There’s only one me

entered into 32 challenges

contributed 0 challenges