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

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

  • Best score: 10
  • Best player score: 11
  • Position: #67 / 555
  • Number of attempts: 3
Wikitext headings to markdown - 987 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #51 / 209
  • Number of attempts: 5
hello-world-vimgolf - 2490 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #113 / 705
  • Number of attempts: 3
Plotting some variables in python - 1660 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: #88 / 347
  • Number of attempts: 10
Transpose a python matrix - 871 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 74
  • Position: #118 / 137
  • Number of attempts: 2
simple replacements - 1753 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 20
  • Position: #125 / 380
  • Number of attempts: 7
Inverting Lines - 1881 entries

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

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

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

  • Best score: 38
  • Best player score: 38
  • Position: #19 / 98
  • Number of attempts: 6
Enumerate Bullets - 320 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: #35 / 84
  • Number of attempts: 9
swap number pairs - 2066 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #96 / 377
  • Number of attempts: 11
Python: Def to Lambda - 453 entries

LAMBDA!!!

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

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

  • Best score: 9
  • Best player score: 10
  • Position: #439 / 1093
  • Number of attempts: 5
Satisfy the go linter - 2374 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: #193 / 469
  • Number of attempts: 6
Add quotes to ansible playbook - 952 entries

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

  • Best score: 8
  • Best player score: 9
  • Position: #176 / 304
  • Number of attempts: 2
Multiline to Single Line - 700 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #167 / 302
  • Number of attempts: 1
xrandr outputs and dashes - 704 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 / 221
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 764 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: #68 / 169
  • Number of attempts: 3
Get mail address from outlook format - 647 entries

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

  • Best score: 15
  • Best player score: 16
  • Position: #121 / 203
  • Number of attempts: 1
prepend * to every non-blank line - 6298 entries

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

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

Complete golang import statement.

  • Best score: 21
  • Best player score: 22
  • Position: #80 / 280
  • Number of attempts: 8
Unsemantic linewrapping - 925 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 / 229
  • Number of attempts: 1
Add string initializers to an enum - 872 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 21
  • Position: #64 / 258
  • Number of attempts: 4
SCREAMING_SNAKE_CASE to Title Case - 1214 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: #116 / 249
  • Number of attempts: 9
Bad Copy Syntax - 2028 entries

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

  • Best score: 18
  • Best player score: 19
  • Position: #212 / 522
  • Number of attempts: 2
change parenthesis - 296 entries

change the pair of braces into a pair of parentheses

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

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

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

entered into 26 challenges

contributed 0 challenges