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

Quick and easy

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

delete all swap

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

Fix the shell script with the fewest keystrokes!

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

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #62 / 203
  • Number of attempts: 19
hello-world-vimgolf - 2367 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #229 / 670
  • Number of attempts: 4
Fill in the chess board - 905 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: #170 / 175
  • Number of attempts: 2
swap number pairs - 2011 entries

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

  • Best score: 16
  • Best player score: 26
  • Position: #193 / 370
  • Number of attempts: 8
prepend * to every non-blank line - 6208 entries

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

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

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 20
  • Position: #2801 / 3044
  • Number of attempts: 2
Search and Replace 0 - 4792 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #705 / 1585
  • Number of attempts: 6
Preferably without multi-cursor plugin - 538 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: #93 / 127
  • Number of attempts: 6
Python Hello World! Reformatting - 939 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: #247 / 365
  • Number of attempts: 2
I forgot quotes - 15931 entries

Oops.

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

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

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

Oops, I spelled that wrong.

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

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

  • Best score: 18
  • Best player score: 39
  • Position: #751 / 768
  • Number of attempts: 1
switch variable - 5036 entries

how fast can you switch two variable ?

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

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #365 / 454
  • Number of attempts: 8
The Cake is a Lie - 1286 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #274 / 512
  • Number of attempts: 5
Reverse characters in a line - 711 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 / 250
  • 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