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

hello-world-vimgolf - 2472 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #151 / 699
  • Number of attempts: 1
Inverting Lines - 1870 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #100 / 505
  • Number of attempts: 1
Making 3 line function a one liner. - 312 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #48 / 200
  • Number of attempts: 1
swap number pairs - 2023 entries

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

  • Best score: 16
  • Best player score: 16
  • Position: #33 / 373
  • Number of attempts: 1
Python: Def to Lambda - 441 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #43 / 154
  • Number of attempts: 1
Rural Post - 4427 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #165 / 1086
  • Number of attempts: 1
Multiline to Single Line - 680 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #145 / 298
  • Number of attempts: 1
Yo To Hello - 1127 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #327 / 522
  • Number of attempts: 1
prepend * to every non-blank line - 6254 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #409 / 1530
  • Number of attempts: 2
One number per line - 18673 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #737 / 3852
  • Number of attempts: 1
Prime Numbers - 345 entries

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 34
  • Position: #6 / 102
  • Number of attempts: 1
citizen_hacks_2019_challenge2 - 194 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Position: #53 / 101
  • Number of attempts: 1
V to the i - 4771 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Position: #774 / 1887
  • Number of attempts: 1
Add semicolons - 10831 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #729 / 3055
  • Number of attempts: 1
Wrap the text of an email message to 79 characters - 705 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #257 / 398
  • Number of attempts: 1
Box it - 7849 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #437 / 1870
  • Number of attempts: 3
Extract argument from function - 2337 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 13
  • Position: #257 / 750
  • Number of attempts: 3
Search and Replace 0 - 4851 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #676 / 1604
  • Number of attempts: 4
Number Sort - 307 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

  • Best score: 9
  • Best player score: 9
  • Position: #125 / 165
  • Number of attempts: 1
Just the middle - 11380 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #1474 / 4174
  • Number of attempts: 1
Swap assigned value - 628 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 10
  • Position: #98 / 252
  • Number of attempts: 2
Neither Fizz nor Buzz - 235 entries

Not your regular increment macro! The gaps are tricky.

  • Best score: 13
  • Best player score: 13
  • Position: #10 / 102
  • Number of attempts: 4
Word frequency alignment - 278 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Position: #109 / 159
  • Number of attempts: 1
Pascal's Triangle - 35 entries

Generate the first 17 left-justified rows of Pascal's triangle.

  • Best score: 36
  • Best player score: 36
  • Position: #9 / 16
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 404 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 10
  • Position: #95 / 190
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1594 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 8
  • Position: #117 / 443
  • Number of attempts: 2
SFD-ROC: ROT13 Phonics - 99 entries

A is for apple, b is for ball, etc... This familiar phonics poem has been rotated 13 characters. Make the letter match the word.

  • Best score: 6
  • Best player score: 6
  • Position: #55 / 72
  • Number of attempts: 1
replacing each line of a block selection - 2966 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #124 / 772
  • Number of attempts: 4
switch variable - 5045 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #643 / 1742
  • Number of attempts: 2
Make it more readable - 1955 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Position: #104 / 643
  • Number of attempts: 4
Line Zipper - 454 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 12
  • Position: #14 / 212
  • Number of attempts: 4
Generate Fibonacci Numbers - 263 entries

Use your super vim powers to generate Fibonacci Numbers.

  • Best score: 19
  • Best player score: 19
  • Position: #19 / 98
  • Number of attempts: 3
Numbering a List - 1869 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 13
  • Position: #60 / 646
  • Number of attempts: 2
Shebangs for all - 1917 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 11
  • Position: #62 / 502
  • Number of attempts: 5
A Simple One - 1009 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #518 / 648
  • Number of attempts: 1
Reverse Simple Deletion - 834 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Position: #47 / 455
  • Number of attempts: 1
The Cake is a Lie - 1301 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #261 / 517
  • Number of attempts: 2
Almost encrypted - 199 entries

Convert the first paragraph to be even less readable.

  • Best score: 5
  • Best player score: 5
  • Position: #118 / 145
  • Number of attempts: 1
Remember FizzBuzz? - 686 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 39
  • Position: #7 / 184
  • Number of attempts: 5
Whitespace, empty lines and tabs - 3508 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 16
  • Position: #21 / 758
  • Number of attempts: 8
Simple text editing with Vim - 12491 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 13
  • Position: #656 / 3626
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 6749 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 31
  • Best player score: 32
  • Position: #169 / 1652
  • Number of attempts: 10
lydxn
Twitter:

entered into 42 challenges

contributed 0 challenges