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

Reformat symbols in list - 1321 entries

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

  • Best score: 24
  • Best player score: 36
  • Position: #199 / 294
  • Number of attempts: 7
Fizzbuzz - 466 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 47
  • Best player score: 74
  • Position: #65 / 146
  • Number of attempts: 2
Many duplicates - 1123 entries

Quick and easy

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

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

  • Best score: 7
  • Best player score: 60
  • Position: #195 / 232
  • Number of attempts: 2
Put a newline after every 10 lines in vim - 1466 entries

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

  • Best score: 10
  • Best player score: 14
  • Position: #394 / 494
  • Number of attempts: 3
hello-world-vimgolf - 2195 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #241 / 625
  • Number of attempts: 5
Inverting Lines - 1683 entries

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

  • Best score: 10
  • Best player score: 16
  • Position: #361 / 458
  • Number of attempts: 3
Generate a very basic Python constructor - 303 entries

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

  • Best score: 38
  • Best player score: 93
  • Position: #85 / 92
  • Number of attempts: 4
Python dataclasses - 882 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 32
  • Position: #181 / 230
  • Number of attempts: 2
RUST Cargo.toml version to last - 319 entries

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

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

Simple challenge for frequent action while programming.

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

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 40
  • Position: #30 / 100
  • Number of attempts: 2
Add semicolons - 10764 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Position: #2503 / 3036
  • Number of attempts: 2
Search and Replace 0 - 4771 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1097 / 1581
  • Number of attempts: 3
Number Sort - 301 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 / 161
  • Number of attempts: 4
Just the middle - 11339 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3176 / 4157
  • Number of attempts: 3
Change attribute to getter - 132 entries

Wrap attributes with a getter method.

  • Best score: 24
  • Best player score: 33
  • Position: #51 / 56
  • Number of attempts: 1
VimGolfNight - 524 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 16
  • Position: #316 / 339
  • Number of attempts: 3
Condensed Cases - 777 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: #234 / 240
  • Number of attempts: 5
I forgot quotes - 15894 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3373 / 4153
  • Number of attempts: 2
quotes inside quotes - 3105 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: #1023 / 1066
  • Number of attempts: 3
Words in parens - 12824 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1163 / 3939
  • Number of attempts: 5
Alphabet soup - 416 entries

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

  • Best score: 25
  • Best player score: 40
  • Position: #78 / 102
  • Number of attempts: 4
Reverse and count - 435 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: #168 / 169
  • Number of attempts: 2
Reverse Simple Deletion - 826 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Position: #56 / 452
  • Number of attempts: 4
grhkm
Twitter:

17 / Uni. of Warwick (Maths) / Once 🐧/ @BlackB6a CTF Player (Crypto) 🇭🇰 / priv: @grhkm_priv

entered into 25 challenges

contributed 0 challenges