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

Turn the months into list items.

  • Best score: 22
  • Best player score: 28
  • Position: #121 / 194
  • Number of attempts: 2
Tic-Tac-Toe Grid Transformation - 326 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: #69 / 79
  • Number of attempts: 2
Remove line numbers - 598 entries

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

  • Best score: 8
  • Best player score: 13
  • Position: #82 / 159
  • Number of attempts: 9
HS exam question - 1517 entries

Convert the data to a python dictionary

  • Best score: 12
  • Best player score: 87
  • Position: #287 / 400
  • Number of attempts: 3
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: 36
  • Position: #222 / 327
  • Number of attempts: 7
Fizzbuzz - 511 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 - 1284 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #322 / 421
  • Number of attempts: 3
Generate a very basic Python constructor (fixed) - 1197 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: #211 / 252
  • Number of attempts: 2
Visual block training - 1028 entries

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

  • Best score: 17
  • Best player score: 38
  • Position: #108 / 191
  • Number of attempts: 3
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: 14
  • Position: #426 / 534
  • Number of attempts: 3
hello-world-vimgolf - 2394 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #241 / 680
  • Number of attempts: 5
Plotting some variables in python - 1593 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: #164 / 340
  • Number of attempts: 2
simple replacements - 1678 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 24
  • Position: #218 / 374
  • Number of attempts: 3
Inverting Lines - 1850 entries

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

  • Best score: 10
  • Best player score: 16
  • Position: #398 / 501
  • 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 - 1113 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 32
  • Position: #221 / 279
  • Number of attempts: 2
RUST Cargo.toml version to last - 325 entries

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

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

Simple challenge for frequent action while programming.

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

List the first 100 prime numbers.

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

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Position: #2515 / 3049
  • Number of attempts: 2
Search and Replace 0 - 4808 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1105 / 1591
  • Number of attempts: 3
Number Sort - 306 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 / 164
  • Number of attempts: 4
Just the middle - 11367 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3180 / 4166
  • 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 - 15935 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3381 / 4163
  • 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 - 12863 entries

We should all ace this, right?

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

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

  • Best score: 25
  • Best player score: 40
  • Position: #80 / 105
  • Number of attempts: 4
Reverse and count - 457 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: #171 / 173
  • 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