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

Put a newline after every 10 lines in vim - 1668 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 11
  • Position: #79 / 561
  • Number of attempts: 7
hello-world-vimgolf - 2513 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #128 / 717
  • Number of attempts: 3
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: 34
  • Position: #82 / 185
  • Number of attempts: 11
Migrated to Postgres! - 338 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

  • Best score: 26
  • Best player score: 27
  • Position: #18 / 133
  • Number of attempts: 3
Inverting Lines - 1932 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 10
  • Position: #65 / 518
  • Number of attempts: 9
HS Final exam vimgolf - 913 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 43
  • Position: #209 / 241
  • Number of attempts: 2
Python: Def to Lambda - 460 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 23
  • Position: #125 / 157
  • Number of attempts: 7
Rural Post - 4572 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 9
  • Position: #162 / 1116
  • Number of attempts: 8
Satisfy the go linter - 2468 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 29
  • Position: #373 / 491
  • Number of attempts: 11
Add quotes to ansible playbook - 1030 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 9
  • Position: #165 / 325
  • Number of attempts: 13
Yo To Hello - 1152 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 11
  • Position: #448 / 534
  • Number of attempts: 3
Replace pattern with 1, 2, 3, ... on each line - 1151 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 22
  • Position: #84 / 233
  • Number of attempts: 14
Get mail address from outlook format - 649 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 15
  • Position: #63 / 204
  • Number of attempts: 5
prepend * to every non-blank line - 6366 entries

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

  • Best score: 10
  • Best player score: 20
  • Position: #1318 / 1555
  • Number of attempts: 1
One number per line - 18831 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 16
  • Position: #1040 / 3889
  • Number of attempts: 18
Add semicolons - 10916 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #726 / 3085
  • Number of attempts: 8
Box it - 7962 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #433 / 1891
  • Number of attempts: 13
Search and Replace 0 - 5031 entries

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

  • Best score: 12
  • Best player score: 20
  • Position: #1510 / 1638
  • Number of attempts: 3
ninja substitution - 1427 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 14
  • Position: #75 / 269
  • Number of attempts: 21
One to Ten - 2241 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 12
  • Position: #334 / 682
  • Number of attempts: 14
Change part of a function name in multiple occurrences - 672 entries

Change the middle part of the function name in multiple places, preferably using the next and dot commands.

  • Best score: 14
  • Best player score: 19
  • Position: #184 / 210
  • Number of attempts: 2
Space out the alphabet - 1659 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 21
  • Position: #293 / 446
  • Number of attempts: 11
Don't know what this is - 2025 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 11
  • Position: #127 / 587
  • Number of attempts: 8
Alphabet soup - 434 entries

Create a column of all alphabet characters organized in a funky way

  • Best score: 25
  • Best player score: 25
  • Position: #11 / 109
  • Number of attempts: 12
Append semicolon after expressions - 1061 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #127 / 421
  • Number of attempts: 5
m397
Twitter:

entered into 25 challenges

contributed 0 challenges