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

Format a long line - 40 entries

Reformat long lines (gq), textwidth=78, no trailing spaces.

  • Best score: 17
  • Best player score: 18
  • Position: #4 / 17
  • Number of attempts: 1
Evil Numbers - 52 entries

Print the first 100 evil numbers https://oeis.org/A001969. This is an advert for code.golf https://code.golf/evil-numbers#viml

  • Best score: 25
  • Best player score: 25
  • Position: #1 / 18
  • Number of attempts: 5
Mirror image - 43 entries

Add the second eye

  • Best score: 15
  • Best player score: 21
  • Position: #6 / 22
  • Number of attempts: 1
Find anomalies - 103 entries

There is one special character per line

  • Best score: 30
  • Best player score: 30
  • Position: #3 / 28
  • Number of attempts: 5
Coordinate extraction - 47 entries

Get the coordinates of all "M"s from the Vim logo

  • Best score: 43
  • Best player score: 44
  • Position: #6 / 14
  • Number of attempts: 7
Quicksort - 1757 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 6
  • Position: #112 / 385
  • Number of attempts: 1
Reformat symbols in list - 1507 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 25
  • Position: #66 / 334
  • Number of attempts: 2
Fizzbuzz - 539 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 45
  • Position: #1 / 162
  • Number of attempts: 5
Substraction (bis) - 582 entries

Solve the equations (adapted from the original @Caek_'s challenge).

  • Best score: 21
  • Best player score: 23
  • Position: #24 / 110
  • Number of attempts: 6
Visual block training - 1047 entries

You see the input. You see the output. Go.

  • Best score: 17
  • Best player score: 17
  • Position: #1 / 195
  • Number of attempts: 5
Levenshtein distance - 105 entries

Compute distance for each pair. Notice that this recursive implementation is very inefficient. Wagner-Fischer algorithm is iterative and much faster. #vimscript

  • Best score: 27
  • Best player score: 33
  • Position: #18 / 37
  • Number of attempts: 5
One number per line - 18673 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 15
  • Position: #831 / 3852
  • Number of attempts: 8
Prime Numbers - 345 entries

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 34
  • Position: #7 / 102
  • Number of attempts: 10
vim = 22 / 7 - 451 entries

pi square vim

  • Best score: 20
  • Best player score: 20
  • Position: #37 / 133
  • Number of attempts: 2
V to the i - 4771 entries

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

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

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #730 / 3055
  • Number of attempts: 2
Every other line - 2902 entries

AaAaAaA

  • Best score: 12
  • Best player score: 13
  • Position: #266 / 702
  • Number of attempts: 6
Kolakoski sequence -- level 1 - 65 entries

Generate the Kolakoski sequence as described by its first 75 terms.

  • Best score: 22
  • Best player score: 26
  • Position: #8 / 18
  • Number of attempts: 2
Long prime list - filter version - 28 entries

I've used the maximum input/diff/output size allowed by vimgolf to get a list of integers up to 1460 separated by newlines, and your goal is to only keep the lines containing primes. There are 232 of them I hope some of you will golf vimscript itself to create some function to run as a primality check for each line, which is a good exercise if you haven't done much vimscript yet! You're invited to also try copy-pasting and doing other non-smart text manipulation. Even more interesting would be to see a solution that uses text manipulation to do the filtering! Whether you use vimscript, normal-mode primality checks, or text manipulation, as long as the end result is valid, your answer will be valid! Let's see which method does better here. Best of luck!

  • Best score: 27
  • Best player score: 27
  • Position: #1 / 9
  • Number of attempts: 2
Sierpinski's Triangle - 84 entries

Build the famous fractal, Sierpinski's Triangle.

  • Best score: 25
  • Best player score: 29
  • Position: #11 / 26
  • Number of attempts: 3
Cartesian product - 222 entries

{1,2,3,4,5} X {1,2,3,4,5}

  • Best score: 24
  • Best player score: 25
  • Position: #9 / 93
  • Number of attempts: 1
50 factorials mod 97 - 50 entries

List 1! to 50!, but give your answer mod 97.

  • Best score: 28
  • Best player score: 28
  • Position: #6 / 19
  • Number of attempts: 3
Counting in binary - 478 entries

"a" represents 0; "A" represents 1. Start from zero and count to 15.

  • Best score: 16
  • Best player score: 17
  • Position: #22 / 114
  • Number of attempts: 1
It's a factor - 92 entries

Flaunt your macro prowess by factoring some numbers. Too hard? It takes less than 30 strokes, I promise.

  • Best score: 24
  • Best player score: 24
  • Position: #1 / 37
  • Number of attempts: 5
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: #96 / 190
  • Number of attempts: 2
Generate Fibonacci Numbers - 263 entries

Use your super vim powers to generate Fibonacci Numbers.

  • Best score: 19
  • Best player score: 19
  • Position: #20 / 98
  • Number of attempts: 1
Reverse Simple Deletion - 834 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #358 / 455
  • Number of attempts: 3

Contributed Challenges

Evil Numbers - 52 entries

Print the first 100 evil numbers https://oeis.org/A001969. This is an advert for code.golf https://code.golf/evil-numbers#viml

wpr__
Twitter:

https://t.co/1JGAljWYRK

entered into 27 challenges

contributed 1 challenges