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

Turn the months into list items.

  • Best score: 22
  • Best player score: 28
  • Position: #137 / 222
  • Number of attempts: 2
Tic-Tac-Toe Grid Transformation - 329 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: #70 / 80
  • Number of attempts: 2
Remove line numbers - 654 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: #90 / 173
  • Number of attempts: 9
HS exam question - 1523 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 87
  • Position: #287 / 404
  • Number of attempts: 3
Reformat symbols in list - 1507 entries

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

  • Best score: 24
  • Best player score: 36
  • Position: #225 / 334
  • Number of attempts: 7
Fizzbuzz - 539 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 74
  • Position: #73 / 162
  • Number of attempts: 2
Many duplicates - 1350 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #339 / 440
  • Number of attempts: 3
Generate a very basic Python constructor (fixed) - 1231 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: #217 / 260
  • Number of attempts: 2
Visual block training - 1047 entries

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

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

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

  • Best score: 10
  • Best player score: 14
  • Position: #441 / 551
  • Number of attempts: 3
hello-world-vimgolf - 2472 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #241 / 699
  • Number of attempts: 5
Plotting some variables in python - 1605 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: #166 / 345
  • Number of attempts: 2
simple replacements - 1710 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 24
  • Position: #220 / 378
  • Number of attempts: 3
Inverting Lines - 1870 entries

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

  • Best score: 10
  • Best player score: 16
  • Position: #401 / 505
  • Number of attempts: 4
Generate a very basic Python constructor - 315 entries

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

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

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 32
  • Position: #222 / 281
  • Number of attempts: 2
RUST Cargo.toml version to last - 332 entries

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

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

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #119 / 200
  • 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 - 10831 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Position: #2520 / 3055
  • Number of attempts: 2
Search and Replace 0 - 4853 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1116 / 1605
  • Number of attempts: 3
Number Sort - 307 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 / 165
  • Number of attempts: 4
Just the middle - 11380 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3182 / 4174
  • Number of attempts: 3
Change attribute to getter - 134 entries

Wrap attributes with a getter method.

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

Based on "The name of the game".

  • Best score: 12
  • Best player score: 16
  • Position: #320 / 344
  • Number of attempts: 3
Condensed Cases - 794 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: #238 / 244
  • Number of attempts: 5
I forgot quotes - 15946 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3384 / 4166
  • Number of attempts: 2
quotes inside quotes - 3128 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: #1029 / 1073
  • Number of attempts: 3
Words in parens - 12868 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1166 / 3950
  • Number of attempts: 5
Alphabet soup - 425 entries

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

  • Best score: 25
  • Best player score: 40
  • Position: #81 / 106
  • Number of attempts: 4
Reverse and count - 459 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: #172 / 174
  • Number of attempts: 2
Reverse Simple Deletion - 834 entries

You did the simple deletion, now reverse it.

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

There’s only one me

entered into 32 challenges

contributed 0 challenges