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

Generate an entry for each month - 274 entries

The input file contains a URI with a month in it. Generate the URIs for all the other months up to a couple of years

  • Best score: 27
  • Best player score: 37
  • Position: #21 / 72
  • Number of attempts: 4
Surround the 'z' character with brackets, quotes, and print as formatted string. - 571 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 18
  • Position: #268 / 320
  • Number of attempts: 1
Paste a column after a column - 2618 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 14
  • Best player score: 14
  • Position: #79 / 567
  • Number of attempts: 8
HS exam question - 1596 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 115
  • Position: #367 / 418
  • Number of attempts: 3
Hogwarts Email Sorting - 932 entries

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

  • Best score: 20
  • Best player score: 21
  • Position: #84 / 264
  • Number of attempts: 11
prepend * to every non-blank line - 6358 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #527 / 1551
  • Number of attempts: 2
One number per line - 18811 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 18
  • Position: #1500 / 3883
  • Number of attempts: 6
Quote modules - 1095 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 28
  • Position: #191 / 286
  • Number of attempts: 1
Unsemantic linewrapping - 934 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: #8 / 233
  • Number of attempts: 1
SCREAMING_SNAKE_CASE to Title Case - 1241 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: #98 / 258
  • Number of attempts: 10
Add semicolons - 10905 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 13
  • Position: #2047 / 3079
  • Number of attempts: 1
Bad Copy Syntax - 2054 entries

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

  • Best score: 18
  • Best player score: 32
  • Position: #458 / 535
  • Number of attempts: 3
remove lines containing the word "reader" - 3616 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #606 / 1174
  • Number of attempts: 3
Com(m)a Trouble - 3910 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 16
  • Position: #523 / 887
  • Number of attempts: 3
Just the middle - 11523 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2827 / 4222
  • Number of attempts: 3
I forgot quotes - 16075 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1946 / 4198
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10703 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2384 / 3696
  • Number of attempts: 1
Words in parens - 12980 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2492 / 3972
  • Number of attempts: 2
Resort and deup a CSV list - 170 entries

I'm always adding items to a sorted list. There has to be a better way dedup and resort the lists. There are multiple lists with varying lengths to discourage manual sorting. Also Australia's animals are weird.

  • Best score: 44
  • Best player score: 114
  • Position: #41 / 44
  • Number of attempts: 1
Rob Pilling
Twitter:

how did this get here i am not good with computer

entered into 19 challenges

contributed 0 challenges