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 - 2367 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #29 / 670
  • Number of attempts: 3
Contribute to keyboard mashing - 842 entries

Speak in tongues

  • Best score: 17
  • Best player score: 17
  • Position: #7 / 258
  • Number of attempts: 4
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: 19
  • Position: #7 / 175
  • Number of attempts: 8
Learn to ask for :help - 544 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #2 / 124
  • Number of attempts: 11
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: 34
  • Position: #24 / 334
  • Number of attempts: 9
Transpose a python matrix - 845 entries

Rotate the matrix in 90 degrees.

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

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 27
  • Position: #4 / 72
  • Number of attempts: 5
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: #12 / 175
  • Number of attempts: 1
Migrated to Postgres! - 312 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

  • Best score: 26
  • Best player score: 26
  • Position: #7 / 122
  • Number of attempts: 2
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: 25
  • Position: #3 / 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: #28 / 371
  • Number of attempts: 12
Inverting Lines - 1837 entries

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

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

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 36
  • Position: #10 / 91
  • Number of attempts: 9
Generate a very basic Python constructor - 309 entries

I actually needed to do this myself, so I look forward to learning how.

  • Best score: 38
  • Best player score: 38
  • Position: #15 / 95
  • Number of attempts: 3
Python dataclasses - 1105 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 19
  • Position: #34 / 278
  • Number of attempts: 6
RUST Cargo.toml version to last - 320 entries

RUST Cargo.toml version to last. rusty practice on vimgolf

  • Best score: 16
  • Best player score: 16
  • Position: #15 / 95
  • Number of attempts: 4
RUST match with enum for Coin - 176 entries

RUST match with enum for Coin rusty practice on vimgolf

  • Best score: 84
  • Best player score: 84
  • Position: #1 / 50
  • Number of attempts: 12
Modernise code - 1336 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #41 / 309
  • Number of attempts: 5
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: 20
  • Position: #20 / 80
  • Number of attempts: 3
swap number pairs - 2011 entries

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

  • Best score: 16
  • Best player score: 16
  • Position: #35 / 370
  • Number of attempts: 10
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: #67 / 227
  • Number of attempts: 7
Easy modification of ssh config - 335 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 24
  • Position: #19 / 104
  • Number of attempts: 6
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: #8 / 63
  • Number of attempts: 13
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: #17 / 53
  • Number of attempts: 10
Python: Def to Lambda - 423 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #46 / 149
  • Number of attempts: 2
Turn the x - 297 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 19
  • Position: #12 / 77
  • 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: 9
  • Position: #167 / 1072
  • Number of attempts: 4
Satisfy the go linter - 2329 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 20
  • Position: #108 / 457
  • Number of attempts: 6
Add quotes to ansible playbook - 930 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 8
  • Position: #49 / 296
  • Number of attempts: 3
Multiline to Single Line - 668 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #151 / 292
  • Number of attempts: 1
Data reformat - 271 entries

Reformat this copy-paste data! #csv

  • Best score: 38
  • Best player score: 38
  • Position: #11 / 60
  • Number of attempts: 6
xrandr outputs and dashes - 652 entries

uh oh, different video drivers identify display outputs with more dashes. Quick, need to change this xrandr script!

  • Best score: 12
  • Best player score: 12
  • Position: #118 / 213
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 747 entries

ThunderLinks are durable hyperlinks to specific email messages generated from Thunderbird in HTML format. Leverage the power of vim to make them suitable for a markdown-formatted file.

  • Best score: 18
  • Best player score: 18
  • Position: #49 / 166
  • Number of attempts: 13
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: #36 / 91
  • Number of attempts: 10
Yo To Hello - 1115 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #334 / 518
  • Number of attempts: 2
Replace pattern with 1, 2, 3, ... on each line - 1098 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 21
  • Position: #38 / 225
  • Number of attempts: 6
Hogwarts Email Sorting - 877 entries

Given a list of emails, get the students full name and their associated house.

  • Best score: 20
  • Best player score: 20
  • Position: #50 / 254
  • Number of attempts: 2
Get mail address from outlook format - 621 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 15
  • Position: #68 / 196
  • Number of attempts: 3
Reconstruct the actual output from my unit test tool report - 151 entries

When a test fails, my unit test tool reports differences between the actual output and the expected output as follow: - line in the expected output but missing in the actual output are prefixed with a dash - unexpected lines in the actual output are prefixed with a plus sign - comments added by the unit test tool are prefixed with a question mark - common lines are showed `as-is` (well, almost;) From that "diff" format, I would like to reconstruct the actual output.

  • Best score: 16
  • Best player score: 16
  • Position: #23 / 51
  • Number of attempts: 4
Add text at some column - 154 entries

Complete golang struct statement.

  • Best score: 31
  • Best player score: 31
  • Position: #17 / 60
  • Number of attempts: 1
prepend * to every non-blank line - 6208 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #410 / 1517
  • Number of attempts: 3
Quote modules - 1054 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 21
  • Position: #35 / 274
  • Number of attempts: 1
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: 30
  • Position: #17 / 150
  • Number of attempts: 6
Quote modules (ver.2) - 211 entries

Complete golang import statement.

  • Best score: 22
  • Best player score: 22
  • Position: #7 / 56
  • Number of attempts: 7
citizen_hacks_2019_challenge2 - 190 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Position: #55 / 100
  • Number of attempts: 2
Unsemantic linewrapping - 890 entries

[Inspired by a blog post I read: https://scott.mn/2014/02/21/semantic_linewrapping/. Text adapted.] Sometimes when editing a Markdown file, I wrap the lines semantically. Instead of inserting a newline at 70 columns (or whatever), or making paragraphs one long line, I put in newlines at a point that seems logical to me. This may seem silly, but it produces better diffs. Semantic linewrapping also makes editing snappier. I can delete, edit or insert sentences easily using linewise operations. Code-oriented text editors like Vim and [REDACTED] are really good at this kind of manipulation. Editing text that hasn't been wrapped semantically is a pain, though:

  • Best score: 9
  • Best player score: 9
  • Position: #92 / 224
  • Number of attempts: 3
Refactor typescript arrow function type - 302 entries

Make arrow function type less verbose and easier to read

  • Best score: 20
  • Best player score: 20
  • Position: #23 / 68
  • Number of attempts: 5
Add string initializers to an enum - 862 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 21
  • Position: #62 / 254
  • Number of attempts: 4
SCREAMING_SNAKE_CASE to Title Case - 1181 entries

Convert strings in SCREAMING_SNAKE_CASE to Title Case. Examples: EMPLOYEE_NAME -> Employee Name REVENUE_YEAR_TO_DATE -> Revenue Year To Date SALARY -> Salary

  • Best score: 19
  • Best player score: 19
  • Position: #56 / 244
  • Number of attempts: 5
Bad Copy Syntax - 2001 entries

Copy should be from right to left, but sometimes you type it wrong.

  • Best score: 18
  • Best player score: 18
  • Position: #28 / 516
  • Number of attempts: 4
Extract wireshark capture filter - 198 entries

Extract wireshark capture filter from IP plan

  • Best score: 25
  • Best player score: 25
  • Position: #6 / 67
  • Number of attempts: 3
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #592 / 2101
  • Number of attempts: 9
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: #10 / 40
  • Number of attempts: 5
citizen_hacks_2019_challenge5 - 138 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Position: #38 / 74
  • Number of attempts: 2
Reformat Cura settings - 112 entries

Cura settings are weirdly encoded... After mere replacements, you'll have to enquote two strings (infill_pattern & speed_travel) and dont forget booleans in lowercase. #format #json

  • Best score: 50
  • Best player score: 50
  • Position: #6 / 21
  • Number of attempts: 6
Line under headers - 2004 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 24
  • Position: #13 / 496
  • Number of attempts: 8
Song Transcription Oops - 234 entries

When transcribing vocal music to Canjo Tab you can start by finding the lowest note and assigning that to zero and working your way up from there. However, without fail, I tend to miscount the notes and when I am near done I find a lower note. I mark this with a "z". This means I have to increase all the previous ones by 1. just a sting of numbers :)

  • Best score: 15
  • Best player score: 15
  • Position: #53 / 75
  • Number of attempts: 1
change parenthesis - 278 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Position: #81 / 156
  • Number of attempts: 2
Remove quotes after first field - 353 entries

Remove the quotes around each field except for the first field.

  • Best score: 16
  • Best player score: 16
  • Position: #28 / 87
  • Number of attempts: 4
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: 33
  • Position: #8 / 55
  • Number of attempts: 9
Alphabet soup - 419 entries

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

  • Best score: 25
  • Best player score: 25
  • Position: #12 / 103
  • Number of attempts: 6
calculations - 269 entries

Complete these (weird) calculations.

  • Best score: 38
  • Best player score: 38
  • Position: #15 / 65
  • Number of attempts: 5
Roman Privalov
Twitter:

entered into 62 challenges

contributed 0 challenges