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

Generate a very basic Python constructor (fixed) - 435 entries

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

  • Best score: 29
  • Best player score: 29
  • Position: #9 / 103
  • Number of attempts: 3
Visual block training - 361 entries

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

  • Best score: 18
  • Best player score: 39
  • Position: #42 / 79
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 842 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #5 / 299
  • Number of attempts: 6
Java to JavaScript - 132 entries

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 96
  • Position: #29 / 37
  • Number of attempts: 4
Wikitext headings to markdown - 544 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #16 / 125
  • Number of attempts: 13
hello-world-vimgolf - 1400 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #125 / 402
  • Number of attempts: 5
Contribute to keyboard mashing - 582 entries

Speak in tongues

  • Best score: 17
  • Best player score: 17
  • Position: #24 / 178
  • Number of attempts: 4
Reordering Lorem Ipsum - 190 entries

Who even sorted this?

  • Best score: 13
  • Best player score: 13
  • Position: #8 / 43
  • Number of attempts: 8
Fill in the chess board - 496 entries

Fill in the name of each square using its file (a-h) and rank (1-8).

  • Best score: 19
  • Best player score: 20
  • Position: #24 / 105
  • Number of attempts: 10
Learn to ask for :help - 377 entries

Learn to use the help to reduce your strokes...

  • Best score: 19
  • Best player score: 32
  • Position: #51 / 84
  • Number of attempts: 3
Plotting some variables in python - 1134 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 36
  • Position: #60 / 238
  • Number of attempts: 7
Transpose a python matrix - 541 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 24
  • Position: #22 / 104
  • Number of attempts: 10
Create a diamond comment - 215 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 27
  • Position: #7 / 52
  • Number of attempts: 11
Lowercase first characters - 331 entries

This is the (abridged) input for Day 3 in Advent of Code 2019. The output is a format more suitable for Prolog programming: the two lines of input become two lists of pairs, joined together in a wires functor.

  • Best score: 33
  • Best player score: 33
  • Position: #19 / 118
  • Number of attempts: 6
Write Hello World in the 'i use arch btw' -programming language - 20 entries

> "I use Arch btw" is an esoteric programming language based on Brainfuck in which the Brainfuck commands have been replaced with the following keywords: i, use, arch, linux, btw, by, the, way. https://github.com/OverMighty/i-use-arch-btw

  • Best score: 162
  • Best player score: 246
  • Position: #5 / 10
  • Number of attempts: 1
Increment number for every 10 lines - 151 entries

The file consists of 2 columns (code and percentage). We need to add 2 more columns with increasing number for 4th column (Xcols) and increment 3rd column (Ycols) only for every 10 lines with reset of 4th column

  • Best score: 25
  • Best player score: 44
  • Position: #25 / 44
  • Number of attempts: 6
simple replacements - 1025 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 19
  • Position: #40 / 229
  • Number of attempts: 7
Inverting Lines - 1274 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #144 / 354
  • Number of attempts: 4
CSV to MD format - 276 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 40
  • Position: #21 / 64
  • Number of attempts: 7
Making 3 line function a one liner. - 145 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #77 / 100
  • Number of attempts: 1
Staircase - 26 entries

Going downstairs, while singing the alphabet song. Some vb practice to us all. Would it be much easier to make it go from left to right instead?

  • Best score: 21
  • Best player score: 36
  • Position: #13 / 15
  • Number of attempts: 2
Enumerate Bullets - 173 entries

We will need to refer to the bullet points in our document explicitly later, so we need to assign them some ID's!

  • Best score: 20
  • Best player score: 73
  • Position: #43 / 46
  • Number of attempts: 1
Put a cross in the square - 111 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 20
  • Position: #7 / 52
  • Number of attempts: 5
HS Final exam vimgolf - 631 entries

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

  • Best score: 21
  • Best player score: 22
  • Position: #56 / 171
  • Number of attempts: 4
ssh config skills - 196 entries

Parse output from `kuebctl get no -o wide` into an .ssh/config file!

  • Best score: 41
  • Best player score: 41
  • Position: #9 / 48
  • Number of attempts: 9
Change double quotes to single quotes, but with a twist - 240 entries

Although this challenge is in the context of a Python function, you don't need to know Python to do this challenge. It is to add contexts and interesting constraints. The file contains a function that prints a multi-line string literal. I wrote the string literal with double quotes, but then I decided to use single quotes instead, and that's your challenge. However, interestingly enough, the string itself contains single and double quotes. This means, inside the string literal, the originally escaped double quotes no longer need to be escaped, but the single quotes now need to be escaped. Note that the triple double quotes in the docstring should be left alone.

  • Best score: 22
  • Best player score: 22
  • Position: #18 / 47
  • Number of attempts: 14
C to python code snippet - 58 entries

C code can be easily translated into Python code. However, the difference in syntax can make this process tedious and time-consuming. Can Vim help you here?

  • Best score: 48
  • Best player score: 71
  • Position: #13 / 19
  • Number of attempts: 3
Mr. Hacker - 47 entries

Elvin is hacker. He has piece of users database from some social net site. Recently he installed Vim, and he wants to convert CSV DB to specific format `key=value' where `key' is login and `value' is password, but password in DB is encrypted in ROT13. Help him.

  • Best score: 19
  • Best player score: 19
  • Position: #10 / 22
  • Number of attempts: 4
Turn the x - 245 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 19
  • Position: #14 / 64
  • Number of attempts: 7
Format the CSS - 90 entries

You just copied some CSS color names from the web and need to add them to your python module. Create the COLORS variable and assign a dict() with the names as keys and hex-colors as values. BEWARE OF THE TABS!!

  • Best score: 41
  • Best player score: 41
  • Position: #2 / 35
  • Number of attempts: 7
Rural Post - 4072 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #413 / 1008
  • Number of attempts: 5
Data reformat - 235 entries

Reformat this copy-paste data! #csv

  • Best score: 38
  • Best player score: 38
  • Position: #12 / 55
  • Number of attempts: 11
Capitalize the Names - 307 entries

I want to capitalize the names in quotes, but just the people's names, not the file names.

  • Best score: 21
  • Best player score: 21
  • Position: #40 / 78
  • Number of attempts: 5
C# function to F# - 9 entries

Converting from C# to F# is not hard, but requires some manual labor. Here you should convert a C# function using a C# class to a F# function using a C# class.

  • Best score: 108
  • Best player score: 118
  • Position: #3 / 6
  • Number of attempts: 1
citizen_hacks_2019_part1 - 29 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 52
  • Best player score: 62
  • Position: #8 / 11
  • Number of attempts: 2
One number per line - 18369 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #743 / 3786
  • Number of attempts: 2
add line and index - 81 entries

a missed line and index names need to be added

  • Best score: 44
  • Best player score: 46
  • Position: #5 / 26
  • Number of attempts: 3
Aliases for cd - 819 entries

Create these beautiful aliases with as few strokes as possible. Are you up for the challenge?

  • Best score: 30
  • Best player score: 31
  • Position: #27 / 146
  • Number of attempts: 15
citizen_hacks_2019_part4 - 10 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 38
  • Best player score: 38
  • Position: #4 / 7
  • Number of attempts: 3
citizen_hacks_2019_part2 - 18 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 41
  • Best player score: 43
  • Position: #6 / 7
  • Number of attempts: 3
citizen_hacks_2019_part5 - 15 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 48
  • Best player score: 49
  • Position: #2 / 7
  • Number of attempts: 2
citizen_hacks_2019_part3 - 15 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 59
  • Best player score: 78
  • Position: #5 / 5
  • Number of attempts: 1
citizen_hacks_2019_part6 - 19 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 35
  • Best player score: 35
  • Position: #3 / 8
  • Number of attempts: 5
Hash staircase - 39 entries

Can you use a strategy to come up with this pattern?

  • Best score: 21
  • Best player score: 21
  • Position: #12 / 19
  • Number of attempts: 1
Kolakoski sequence -- level 1 - 57 entries

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

  • Best score: 22
  • Best player score: 32
  • Position: #9 / 16
  • Number of attempts: 4
Letterbox - 88 entries

Make a box!

  • Best score: 35
  • Best player score: 58
  • Position: #20 / 24
  • Number of attempts: 2
Triangle of arrows - 126 entries

I made this by accident when working on another challenge. How would you go about making this?

  • Best score: 14
  • Best player score: 14
  • Position: #11 / 33
  • Number of attempts: 11
A grid of punctuation - 115 entries

Create a checkerboard of = and - in an 80×24 grid!

  • Best score: 16
  • Best player score: 16
  • Position: #28 / 54
  • Number of attempts: 2
citizen_hacks_2019_challenge5 - 116 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Position: #39 / 61
  • Number of attempts: 1
Pascal's Triangle - 28 entries

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

  • Best score: 36
  • Best player score: 45
  • Position: #13 / 13
  • Number of attempts: 1
citizen_hacks_2019_part9 - 15 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 48
  • Best player score: 54
  • Position: #3 / 5
  • Number of attempts: 2
Simple Maths 2 - 26 entries

Time to practice expression register! #maths #linear

  • Best score: 17
  • Best player score: 21
  • Position: #7 / 10
  • Number of attempts: 7
ASCII-art Histogram - 285 entries

Create an ASCCI-art histogram for the given numbers. Make sure not to leave trailing whitespaces. Thanks to VimGolf I recently discovered a feature of Vim thAT blew my mind. I'm curious to see what real ninjas make of it ;-)

  • Best score: 33
  • Best player score: 35
  • Position: #25 / 51
  • Number of attempts: 7
Alphabet soup - 378 entries

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

  • Best score: 25
  • Best player score: 26
  • Position: #47 / 90
  • Number of attempts: 3
Sammit
Twitter:

Please message/@ me here for any help in West/Central Delhi. Will try to arrange oxygen cylinders, concentrators, beds, tests, scans, whatever needed

entered into 54 challenges

contributed 0 challenges