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

Quick and easy

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

delete all swap

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

Fix the shell script with the fewest keystrokes!

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

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #68 / 215
  • Number of attempts: 19
hello-world-vimgolf - 2535 entries

Simple number generation

  • Best score: 6
  • Best player score: 10
  • Position: #230 / 728
  • Number of attempts: 4
Fill in the chess board - 980 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: #182 / 187
  • Number of attempts: 2
swap number pairs - 2174 entries

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

  • Best score: 7
  • Best player score: 26
  • Position: #205 / 395
  • Number of attempts: 8
prepend * to every non-blank line - 6401 entries

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

  • Best score: 7
  • Best player score: 10
  • Position: #427 / 1566
  • Number of attempts: 9
Add semicolons - 10966 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 20
  • Position: #2852 / 3100
  • Number of attempts: 2
Search and Replace 0 - 5170 entries

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

  • Best score: 7
  • Best player score: 12
  • Position: #706 / 1680
  • Number of attempts: 6
Preferably without multi-cursor plugin - 584 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: #99 / 135
  • Number of attempts: 6
Python Hello World! Reformatting - 1057 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: #266 / 402
  • Number of attempts: 2
I forgot quotes - 16255 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #1125 / 4229
  • Number of attempts: 10
quotes inside quotes - 3210 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: 7
  • Best player score: 14
  • Position: #356 / 1097
  • Number of attempts: 5
A simple change - 486 entries

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

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

Oops, I spelled that wrong.

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

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

  • Best score: 7
  • Best player score: 39
  • Position: #773 / 791
  • Number of attempts: 1
switch variable - 5136 entries

how fast can you switch two variable ?

  • Best score: 9
  • Best player score: 11
  • Position: #660 / 1767
  • Number of attempts: 6
Reverse Simple Deletion - 875 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #370 / 467
  • Number of attempts: 8
The Cake is a Lie - 1422 entries

Correct the capitalization of each word

  • Best score: 8
  • Best player score: 9
  • Position: #275 / 546
  • Number of attempts: 5
Reverse characters in a line - 848 entries

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

  • Best score: 8
  • Best player score: 12
  • Position: #22 / 285
  • 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