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

Satisfy the go linter - 1202 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
  • Number of attempts: 5
Add quotes to ansible playbook - 325 entries

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

  • Best score: 8
  • Best player score: 9
  • Number of attempts: 2
prepend * to every non-blank line - 5156 entries

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

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 2
Quote modules - 875 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 27
  • Number of attempts: 2
Hogwarts Email Sorting - 712 entries

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

  • Best score: 20
  • Best player score: 31
  • Number of attempts: 2
Line under headers - 1731 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 42
  • Number of attempts: 1
citizen_hacks_2019_challenge3 - 22 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 4
  • Best player score: 4
  • Number of attempts: 1
Unsemantic linewrapping - 741 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: 17
  • Number of attempts: 1
Bad Copy Syntax - 1800 entries

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

  • Best score: 10
  • Best player score: 31
  • Number of attempts: 2
Add semicolons - 9630 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 2
Box it - 7276 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 32
  • Number of attempts: 2
One to Ten - 1948 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 1
Delete to the end of the current line - 692 entries

Delete to the end of the current line, but keep the character under the cursor.

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
remove lines containing the word "reader" - 3286 entries

easy stuff

  • Best score: 9
  • Best player score: 14
  • Number of attempts: 1
Com(m)a Trouble - 3120 entries

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

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 1
Remember VimGolf Rules ! - 218 entries

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
Turn a ninja to case-insensitive [Nn][Ii][Nn][Jj][Aa] regexp! - 41 entries

I bumped into this in a dailywtf code: http://pastebin.com/QApa5ycS I didn't want to translate a string whenever I wanted to be [Ss][Aa][Rr][Cc][Aa][Ss][Tt][Ii][Cc] on slack, so I figured a script (python, sed, whatever) would be helpful. Well, or a few vim keystroke!

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 1
From A to B - 533 entries

Mirror and change this text block

  • Best score: 16
  • Best player score: 20
  • Number of attempts: 2
One number per line - 17704 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 24
  • Number of attempts: 1
ASCII Art - 80 entries

how good are you with simple regex?

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 1
Replace and keep the case - 369 entries

Replace all instance of plugin and Plugin to device and Device.

  • Best score: 26
  • Best player score: 27
  • Number of attempts: 7
Assign numbers to fields - 90 entries

You are given a list of space-separated strings. Add an increasing numeric prefix to each one.

  • Best score: 19
  • Best player score: 30
  • Number of attempts: 1
Simple, Practical, and Common - 32075 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 28
  • Number of attempts: 3
Make HTML List - 930 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 50
  • Number of attempts: 1
Remove hard line breaks - 41 entries

Text files with Hard breaks are not good for e-readers. We need remove all hard line breaks and have long lines.

  • Best score: 10
  • Best player score: 23
  • Number of attempts: 1
Greek column realign - 41 entries

Oops one letter is missing! Shift down the second column to insert nu letter. Symbol can be entered using: <C-K>n*

  • Best score: 21
  • Best player score: 40
  • Number of attempts: 1
Just the middle - 10913 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 10
  • Number of attempts: 1
Roman numerals - 58 entries

Use the substitutions on top to convert unary to Roman numerals.

  • Best score: 17
  • Best player score: 52
  • Number of attempts: 1
V to the i - 4526 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
Delete unwanted lines - 350 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 12
  • Number of attempts: 1
Words in parens - 12475 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 1
Checkerboard case pattern - 127 entries

All the squares are white. Make some of them black. But only the right ones.

  • Best score: 15
  • Best player score: 25
  • Number of attempts: 1
Presidential Sorting - 47 entries

Given a nice CSV formatted arrangement of the Presidents of the United States, we need to print out an alphabetical list in pretty columns. Prove that vim can conquer this basic Excel task!

  • Best score: 40
  • Best player score: 66
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 344 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: 11
  • Number of attempts: 1
Generate English Alphabets - 425 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 24
  • Number of attempts: 1
Indentation - 420 entries

Indent each line according to the right number of spaces it needs.

  • Best score: 21
  • Best player score: 25
  • Number of attempts: 2
Flodder-challenge - 829 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 36
  • Number of attempts: 3
Whitespace, empty lines and tabs - 2733 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 31
  • Number of attempts: 1
Simple text editing with Vim - 11238 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 5752 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 32
  • Best player score: 46
  • Number of attempts: 1
Bitt Faulk
Twitter:

entered into 40 challenges

contributed 0 challenges