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 - 186 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: #20 / 71
  • Number of attempts: 3
Generate a very basic Python constructor - 172 entries

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

  • Best score: 38
  • Best player score: 38
  • Position: #8 / 47
  • Number of attempts: 9
Python dataclasses - 418 entries

Simple challenge to extract fields from a Python class

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

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

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

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #33 / 147
  • Number of attempts: 10
Enumerate Bullets - 137 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 / 35
  • Number of attempts: 10
swap number pairs - 1255 entries

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

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

Just add some more stuff

  • Best score: 37
  • Best player score: 77
  • Position: #21 / 25
  • Number of attempts: 1
ssh config skills - 163 entries

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

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

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #36 / 79
  • Number of attempts: 6
Satisfy the go linter - 1611 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 / 331
  • Number of attempts: 6
Add quotes to ansible playbook - 576 entries

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

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

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

  • Best score: 5
  • Best player score: 5
  • Position: #130 / 177
  • Number of attempts: 2
xrandr outputs and dashes - 555 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 / 183
  • Number of attempts: 3
Capitalize the Names - 280 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: #33 / 71
  • Number of attempts: 9
Yo To Hello - 980 entries

Simply Turn Yo To Hello

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

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

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

Well, swap the values...

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

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

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

abc trying to be cool or not...

  • Best score: 15
  • Best player score: 15
  • Position: #66 / 214
  • Number of attempts: 10
From argument to object - 1256 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 / 415
  • Number of attempts: 2
Extract argument from function - 2194 entries

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

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

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #1473 / 4093
  • Number of attempts: 4
Todo list specification - 359 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 / 164
  • Number of attempts: 5
Fiddle percentages into real numbers - 791 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 / 269
  • 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 - 956 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Position: #293 / 406
  • 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? - 1089 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 31
  • Position: #211 / 288
  • Number of attempts: 2
Dehamlizing - 170 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 32
  • Position: #6 / 65
  • Number of attempts: 9
The Quick Brown Fox Jumps Over The Lazy Vim - 373 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 / 175
  • Number of attempts: 2
Saving the hashes(#) - 1937 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 / 462
  • 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 - 2319 entries

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

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #180 / 619
  • Number of attempts: 5
Append semicolon after expressions - 930 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #129 / 377
  • 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 - 653 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 / 256
  • Number of attempts: 2
Remove semicolons after expressions - 518 entries

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

  • Best score: 6
  • Best player score: 7
  • Position: #122 / 227
  • Number of attempts: 3
HTML to Haml - 778 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 27
  • Position: #41 / 193
  • Number of attempts: 13
PEP8 Python Wrapping Comments and Code - 160 entries

According to PEP8, long flowy text and code should have different max line lengths. Code: 79 characters max Long flowy text: 72 characters max

  • Best score: 23
  • Best player score: 41
  • Position: #52 / 59
  • Number of attempts: 3
Get rid of html tags - 326 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 15
  • Best player score: 16
  • Position: #9 / 200
  • Number of attempts: 2
Arya Kumar
Twitter:

entered into 46 challenges

contributed 0 challenges