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

Quick and easy

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

delete all swap

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

Fix the shell script with the fewest keystrokes!

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

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #61 / 197
  • Number of attempts: 19
hello-world-vimgolf - 2298 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #229 / 649
  • Number of attempts: 4
Fill in the chess board - 886 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: #168 / 173
  • Number of attempts: 2
swap number pairs - 2000 entries

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

  • Best score: 16
  • Best player score: 26
  • Position: #192 / 368
  • Number of attempts: 8
prepend * to every non-blank line - 6196 entries

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

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

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 20
  • Position: #2799 / 3042
  • Number of attempts: 2
Search and Replace 0 - 4785 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #705 / 1584
  • 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 - 936 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 / 363
  • Number of attempts: 2
I forgot quotes - 15918 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #1125 / 4158
  • Number of attempts: 10
quotes inside quotes - 3124 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 / 1071
  • Number of attempts: 5
A simple change - 434 entries

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

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

Oops, I spelled that wrong.

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

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

  • Best score: 18
  • Best player score: 39
  • Position: #746 / 763
  • Number of attempts: 1
switch variable - 5026 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #659 / 1733
  • 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 - 1284 entries

Correct the capitalization of each word

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