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

Quick and easy

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

delete all swap

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

Fix the shell script with the fewest keystrokes!

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

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #49 / 172
  • Number of attempts: 19
hello-world-vimgolf - 1986 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #229 / 565
  • Number of attempts: 4
Fill in the chess board - 738 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: #152 / 156
  • Number of attempts: 2
swap number pairs - 1874 entries

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

  • Best score: 16
  • Best player score: 26
  • Position: #177 / 347
  • Number of attempts: 8
prepend * to every non-blank line - 6120 entries

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

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

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 20
  • Position: #2780 / 3023
  • Number of attempts: 2
Search and Replace 0 - 4753 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #705 / 1575
  • Number of attempts: 6
Preferably without multi-cursor plugin - 527 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: #90 / 124
  • Number of attempts: 6
Python Hello World! Reformatting - 930 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: #246 / 361
  • Number of attempts: 2
I forgot quotes - 15852 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #1125 / 4136
  • Number of attempts: 10
quotes inside quotes - 3089 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 / 1061
  • Number of attempts: 5
A simple change - 433 entries

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

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

Oops, I spelled that wrong.

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

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

  • Best score: 18
  • Best player score: 39
  • Position: #739 / 756
  • Number of attempts: 1
switch variable - 4997 entries

how fast can you switch two variable ?

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

You did the simple deletion, now reverse it.

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

Correct the capitalization of each word

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