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

Lowercase first characters - 56 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: 35
  • Position: #7 / 22
  • Number of attempts: 3
Generate a very basic Python constructor - 112 entries

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

  • Best score: 30
  • Best player score: 38
  • Position: #9 / 33
  • Number of attempts: 9
Python dataclasses - 262 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 19
  • Position: #19 / 78
  • Number of attempts: 9
RUST Cargo.toml version to last - 157 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #41 / 51
  • Number of attempts: 1
Making 3 line function a one liner. - 43 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #26 / 36
  • Number of attempts: 1
Modernise code - 507 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #33 / 117
  • Number of attempts: 10
Enumerate Bullets - 112 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: #16 / 28
  • Number of attempts: 10
swap number pairs - 1114 entries

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

  • Best score: 16
  • Best player score: 16
  • Position: #30 / 213
  • Number of attempts: 14
Extend shell script - 55 entries

Just add some more stuff

  • Best score: 37
  • Best player score: 77
  • Position: #18 / 20
  • Number of attempts: 1
ssh config skills - 149 entries

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

  • Best score: 41
  • Best player score: 41
  • Position: #7 / 38
  • Number of attempts: 8
Change double quotes to single quotes, but with a twist - 204 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: #16 / 43
  • Number of attempts: 11
Python: Def to Lambda - 172 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #36 / 64
  • Number of attempts: 6
Satisfy the go linter - 1519 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: #104 / 314
  • Number of attempts: 6
Add quotes to ansible playbook - 516 entries

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

  • Best score: 8
  • Best player score: 8
  • Position: #45 / 171
  • Number of attempts: 4
Multiline to Single Line - 321 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #130 / 152
  • Number of attempts: 2
xrandr outputs and dashes - 523 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: #114 / 173
  • Number of attempts: 3
Capitalize the Names - 248 entries

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

  • Best score: 3
  • Best player score: 21
  • Position: #34 / 65
  • Number of attempts: 9
Yo To Hello - 883 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #304 / 414
  • Number of attempts: 3
Hogwarts Email Sorting - 783 entries

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

  • Best score: 20
  • Best player score: 20
  • Position: #49 / 224
  • Number of attempts: 6
Reconstruct the actual output from my unit test tool report - 121 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: #22 / 41
  • Number of attempts: 5
Swap values - 4390 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 11
  • Position: #348 / 1230
  • Number of attempts: 6
prepend * to every non-blank line - 5776 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #404 / 1421
  • Number of attempts: 7
Cool or not? - 738 entries

abc trying to be cool or not...

  • Best score: 15
  • Best player score: 15
  • Position: #66 / 212
  • Number of attempts: 10
From argument to object - 1250 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 17
  • Position: #141 / 412
  • Number of attempts: 2
Extract argument from function - 2186 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 13
  • Position: #256 / 721
  • Number of attempts: 4
Just the middle - 11074 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #1473 / 4088
  • Number of attempts: 4
Todo list specification - 350 entries

The every item on the todo list must be done today. Modify the list to reflect that.

  • Best score: 37
  • Best player score: 37
  • Position: #87 / 161
  • Number of attempts: 5
Fiddle percentages into real numbers - 789 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 13
  • Position: #150 / 267
  • Number of attempts: 5
JS notation to Immutable.js notation - 153 entries

Now Immutable.js made its way into many frontends. This challenge consists of a typical refactoring that many of us are facing now.

  • Best score: 35
  • Best player score: 40
  • Position: #34 / 57
  • Number of attempts: 2
FoodCritic023: Prefer conditional attributes - 175 entries

FoodCritic (www.foodcritic.io) is a lint tool for your Chef (learn.chef.io) cookbooks. FC023 indicates that you should prefer Chef guards over Ruby conditions. This challenge expects you to be able to fix this issue in a sample cookbook, given the FoodCritic output: ================================================================ FC023: Prefer conditional attributes: cookbooks/foo/recipes/default.rb:25 ================================================================ See http://www.foodcritic.io/#FC023 for more details about the changes being made.

  • Best score: 25
  • Best player score: 25
  • Position: #6 / 49
  • Number of attempts: 9
comments galore - 954 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Position: #293 / 405
  • Number of attempts: 2
Refactoring useless Method away - 89 entries

Real-life challenge, convert a bunch of ifs to a switch statement

  • Best score: 47
  • Best player score: 47
  • Position: #5 / 31
  • Number of attempts: 11
Do you demand a shrubbery? - 1081 entries

Use :redir and crush the emacsgolfers.

  • Best score: 8
  • Best player score: 31
  • Position: #210 / 286
  • Number of attempts: 2
Dehamlizing - 165 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 32
  • Position: #6 / 64
  • Number of attempts: 9
The Quick Brown Fox Jumps Over The Lazy Vim - 356 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: 10
  • Best player score: 10
  • Position: #87 / 173
  • Number of attempts: 2
Saving the hashes(#) - 1929 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 21
  • Position: #120 / 461
  • Number of attempts: 8
Inconsistent real estate paste - 159 entries

Format a hand-typed real estate listing that uses inconsistent punctuation into four sections

  • Best score: 24
  • Best player score: 24
  • Position: #9 / 51
  • Number of attempts: 7
Vertical Limit - 2300 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 21
  • Position: #93 / 701
  • Number of attempts: 5
Switch function arguments - 1933 entries

How to switch two arguments of a function.

  • Best score: 3
  • Best player score: 11
  • Position: #181 / 617
  • Number of attempts: 5
Append semicolon after expressions - 912 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #129 / 374
  • Number of attempts: 4
Reverse and double space - 433 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 14
  • Position: #64 / 179
  • Number of attempts: 9
Remove noise from HTTP log - 641 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Position: #135 / 255
  • Number of attempts: 2
Remove semicolons after expressions - 511 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 7
  • Position: #121 / 225
  • Number of attempts: 3
HTML to Haml - 775 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 27
  • Position: #41 / 192
  • Number of attempts: 13
Arya Kumar
Twitter:

entered into 44 challenges

contributed 0 challenges