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

Many duplicates - 1445 entries

Quick and easy

  • Best score: 7
  • Best player score: 7
  • Position: #12 / 468
  • Number of attempts: 7
delete swap - 1786 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #141 / 555
  • Number of attempts: 6
Fix the shell script! - 2544 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 26
  • Position: #39 / 589
  • Number of attempts: 9
Wikitext headings to markdown - 987 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #63 / 209
  • Number of attempts: 19
hello-world-vimgolf - 2499 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #229 / 708
  • Number of attempts: 4
Fill in the chess board - 959 entries

Fill in the name of each square using its file (a-h) and rank (1-8).

  • Best score: 19
  • Best player score: 160
  • Position: #180 / 185
  • Number of attempts: 2
swap number pairs - 2103 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 26
  • Position: #197 / 380
  • Number of attempts: 8
prepend * to every non-blank line - 6308 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 10
  • Position: #426 / 1537
  • Number of attempts: 9
Add semicolons - 10852 entries

Simply add a semicolon at the end of each line

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

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

  • Best score: 12
  • Best player score: 12
  • Position: #705 / 1624
  • Number of attempts: 6
Preferably without multi-cursor plugin - 540 entries

Originally asked as question on reddit by kpthunder: https://www.reddit.com/r/vim/comments/9fvsro/what_is_the_most_efficient_way_to_go_about/

  • Best score: 30
  • Best player score: 38
  • Position: #94 / 129
  • Number of attempts: 6
Python Hello World! Reformatting - 994 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 44
  • Position: #256 / 380
  • Number of attempts: 2
I forgot quotes - 15983 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #1125 / 4180
  • Number of attempts: 10
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: 14
  • Position: #355 / 1078
  • Number of attempts: 5
A simple change - 461 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 12
  • Position: #50 / 191
  • Number of attempts: 11
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Position: #134 / 445
  • Number of attempts: 8
replacing each line of a block selection - 2999 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 39
  • Position: #760 / 777
  • Number of attempts: 1
switch variable - 5071 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #659 / 1748
  • Number of attempts: 6
Reverse Simple Deletion - 847 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #366 / 458
  • Number of attempts: 8
The Cake is a Lie - 1346 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #274 / 527
  • Number of attempts: 5
Reverse characters in a line - 771 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 12
  • Position: #21 / 265
  • Number of attempts: 6
Andrii Soldatenko
Twitter:

Public speaker, data engineer and #OSS and #golang contributor. Blogger at https://t.co/APBXlpQZpL.

entered into 21 challenges

contributed 0 challenges