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

Put a newline after every 10 lines in vim - 1092 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #47 / 379
  • Number of attempts: 3
Wikitext headings to markdown - 681 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #31 / 151
  • Number of attempts: 5
hello-world-vimgolf - 1672 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #113 / 479
  • Number of attempts: 3
Plotting some variables in python - 1237 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: #66 / 259
  • Number of attempts: 10
Transpose a python matrix - 616 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 74
  • Position: #92 / 110
  • Number of attempts: 2
simple replacements - 1153 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 20
  • Position: #94 / 256
  • Number of attempts: 7
Inverting Lines - 1399 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #140 / 383
  • Number of attempts: 3
Generate a very basic Python constructor - 280 entries

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

  • Best score: 38
  • Best player score: 38
  • Position: #19 / 80
  • Number of attempts: 6
Enumerate Bullets - 217 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: 24
  • Position: #29 / 57
  • Number of attempts: 9
swap number pairs - 1611 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #86 / 299
  • Number of attempts: 11
Python: Def to Lambda - 388 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #52 / 131
  • Number of attempts: 3
Rural Post - 4138 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #416 / 1023
  • Number of attempts: 5
Satisfy the go linter - 2025 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: 21
  • Position: #169 / 408
  • Number of attempts: 6
Add quotes to ansible playbook - 801 entries

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

  • Best score: 8
  • Best player score: 9
  • Position: #166 / 252
  • Number of attempts: 2
Multiline to Single Line - 542 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #167 / 243
  • Number of attempts: 1
xrandr outputs and dashes - 608 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: #128 / 196
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 707 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: 19
  • Position: #63 / 157
  • Number of attempts: 3
Get mail address from outlook format - 598 entries

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

  • Best score: 15
  • Best player score: 16
  • Position: #114 / 186
  • Number of attempts: 1
prepend * to every non-blank line - 6037 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #413 / 1478
  • Number of attempts: 3
Quote modules - 1022 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 22
  • Position: #76 / 261
  • Number of attempts: 8
Unsemantic linewrapping - 843 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: #93 / 212
  • Number of attempts: 1
Add string initializers to an enum - 784 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 21
  • Position: #64 / 234
  • Number of attempts: 4
SCREAMING_SNAKE_CASE to Title Case - 1123 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: 20
  • Position: #110 / 234
  • Number of attempts: 9
Bad Copy Syntax - 1948 entries

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

  • Best score: 18
  • Best player score: 19
  • Position: #207 / 495
  • Number of attempts: 2
change parenthesis - 256 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Position: #82 / 144
  • Number of attempts: 3
Reorder the groups - 1119 entries

Change the order so that the groups of fruit come before the vegetables.

  • Best score: 14
  • Best player score: 14
  • Position: #88 / 254
  • Number of attempts: 7
Humbaba
Twitter:

entered into 26 challenges

contributed 0 challenges