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

Reformat symbols in list - 1470 entries

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

  • Best score: 24
  • Best player score: 25
  • Position: #63 / 323
  • Number of attempts: 2
Fizzbuzz - 510 entries

type the first 100 lines of the fizzbuzz problem

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

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

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

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

  • Best score: 17
  • Best player score: 17
  • Position: #1 / 183
  • Number of attempts: 5
Levenshtein distance - 104 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: #17 / 36
  • Number of attempts: 5
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 15
  • Position: #827 / 3842
  • Number of attempts: 8
Prime Numbers - 344 entries

List the first 100 prime numbers.

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

pi square vim

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

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

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

Simply add a semicolon at the end of each line

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

AaAaAaA

  • Best score: 12
  • Best player score: 13
  • Position: #264 / 700
  • Number of attempts: 6
Kolakoski sequence -- level 1 - 57 entries

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

  • Best score: 22
  • Best player score: 26
  • Position: #6 / 16
  • Number of attempts: 2
Long prime list - filter version - 27 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 / 8
  • Number of attempts: 2
Sierpinski's Triangle - 83 entries

Build the famous fractal, Sierpinski's Triangle.

  • Best score: 25
  • Best player score: 29
  • Position: #10 / 25
  • Number of attempts: 3
Cartesian product - 221 entries

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

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

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

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

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

  • Best score: 16
  • Best player score: 17
  • Position: #21 / 113
  • Number of attempts: 1
It's a factor - 91 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 / 36
  • Number of attempts: 5
The Quick Brown Fox Jumps Over The Lazy Vim - 401 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 / 188
  • Number of attempts: 2
Generate Fibonacci Numbers - 262 entries

Use your super vim powers to generate Fibonacci Numbers.

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

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #357 / 454
  • Number of attempts: 3
wpr__
Twitter:

entered into 21 challenges

contributed 0 challenges