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) - 1179 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 / 248
  • Number of attempts: 3
Visual block training - 1005 entries

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

  • Best score: 17
  • Best player score: 39
  • Position: #107 / 185
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1578 entries

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

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

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 96
  • Position: #47 / 67
  • Number of attempts: 4
Wikitext headings to markdown - 980 entries

Convert the wikitext headings to markdown.

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

Simple number generation

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

Speak in tongues

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

Who even sorted this?

  • Best score: 13
  • Best player score: 13
  • Position: #8 / 61
  • Number of attempts: 8
Fill in the chess board - 905 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: #41 / 175
  • Number of attempts: 10
Learn to ask for :help - 541 entries

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

  • Best score: 19
  • Best player score: 32
  • Position: #67 / 122
  • Number of attempts: 3
Plotting some variables in python - 1567 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: #86 / 334
  • Number of attempts: 7
Transpose a python matrix - 845 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 24
  • Position: #28 / 134
  • Number of attempts: 10
Create a diamond comment - 314 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 27
  • Position: #7 / 72
  • Number of attempts: 11
Lowercase first characters - 467 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 / 175
  • Number of attempts: 6
Write Hello World in the 'i use arch btw' -programming language - 30 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: #8 / 15
  • Number of attempts: 1
Increment number for every 10 lines - 219 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: #29 / 61
  • Number of attempts: 6
simple replacements - 1662 entries

The goal is to see the replacement commands in action.

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

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

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

To convert a CSV list to Markdown list

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

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #77 / 194
  • Number of attempts: 1
Staircase - 137 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: #22 / 31
  • Number of attempts: 2
Enumerate Bullets - 292 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: #76 / 80
  • Number of attempts: 1
Put a cross in the square - 203 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 20
  • Position: #7 / 84
  • Number of attempts: 5
HS Final exam vimgolf - 864 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: #69 / 227
  • Number of attempts: 4
ssh config skills - 249 entries

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

  • Best score: 41
  • Best player score: 41
  • Position: #9 / 63
  • Number of attempts: 9
Change double quotes to single quotes, but with a twist - 281 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 / 53
  • Number of attempts: 14
C to python code snippet - 81 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: #17 / 28
  • Number of attempts: 3
Mr. Hacker - 78 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 / 32
  • Number of attempts: 4
Turn the x - 297 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 19
  • Position: #14 / 77
  • Number of attempts: 7
Format the CSS - 115 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 / 43
  • Number of attempts: 7
Rural Post - 4368 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #433 / 1072
  • Number of attempts: 5
Data reformat - 271 entries

Reformat this copy-paste data! #csv

  • Best score: 38
  • Best player score: 38
  • Position: #12 / 60
  • Number of attempts: 11
Capitalize the Names - 361 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 / 91
  • Number of attempts: 5
C# function to F# - 25 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: 101
  • Best player score: 118
  • Position: #6 / 9
  • Number of attempts: 1
citizen_hacks_2019_part1 - 36 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 52
  • Best player score: 62
  • Position: #10 / 14
  • Number of attempts: 2
One number per line - 18616 entries

Just give me the numbers.

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

a missed line and index names need to be added

  • Best score: 44
  • Best player score: 46
  • Position: #6 / 27
  • Number of attempts: 3
Aliases for cd - 849 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: #29 / 150
  • Number of attempts: 15
citizen_hacks_2019_part4 - 12 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 38
  • Best player score: 38
  • Position: #4 / 8
  • 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 - 17 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 48
  • Best player score: 49
  • Position: #2 / 8
  • 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 - 20 entries

For the Citizen Hacks 2019 Vim competition

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

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

  • Best score: 21
  • Best player score: 21
  • Position: #12 / 22
  • 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 - 91 entries

Make a box!

  • Best score: 35
  • Best player score: 58
  • Position: #21 / 25
  • Number of attempts: 2
Triangle of arrows - 171 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 / 40
  • Number of attempts: 11
A grid of punctuation - 124 entries

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

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

For the Citizen Hacks 2019 Vim competition.

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

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

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

For the Citizen Hacks 2019 Vim competition

  • Best score: 48
  • Best player score: 54
  • Position: #6 / 8
  • Number of attempts: 2
Simple Maths 2 - 29 entries

Time to practice expression register! #maths #linear

  • Best score: 17
  • Best player score: 21
  • Position: #7 / 13
  • Number of attempts: 7
ASCII-art Histogram - 310 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: #27 / 55
  • Number of attempts: 7
Alphabet soup - 419 entries

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

  • Best score: 25
  • Best player score: 26
  • Position: #52 / 103
  • 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