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

Fix the shell script! - 987 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 48
  • Position: #194 / 253
  • Number of attempts: 2
simple replacements - 1072 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 19
  • Position: #47 / 239
  • Number of attempts: 1
Inverting Lines - 1296 entries

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

  • Best score: 10
  • Best player score: 48
  • Position: #360 / 363
  • Number of attempts: 1
swap number pairs - 1475 entries

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

  • Best score: 16
  • Best player score: 81
  • Position: #280 / 285
  • Number of attempts: 1
Rural Post - 4105 entries

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

  • Best score: 9
  • Best player score: 177
  • Position: #1010 / 1015
  • Number of attempts: 1
Satisfy the go linter - 2007 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: #129 / 404
  • Number of attempts: 1
Add quotes to ansible playbook - 781 entries

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

  • Best score: 8
  • Best player score: 8
  • Position: #67 / 246
  • Number of attempts: 8
Multiline to Single Line - 522 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #189 / 235
  • Number of attempts: 1
prepend * to every non-blank line - 5959 entries

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

  • Best score: 10
  • Best player score: 26
  • Position: #1397 / 1463
  • Number of attempts: 1
Unsemantic linewrapping - 826 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: 52
  • Position: #208 / 208
  • Number of attempts: 1
SCREAMING_SNAKE_CASE to Title Case - 1117 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: 86
  • Position: #231 / 232
  • Number of attempts: 1
Box it - 7680 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 74
  • Position: #1792 / 1835
  • Number of attempts: 1
Just the middle - 11136 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 13
  • Position: #4026 / 4112
  • Number of attempts: 2
Line under headers - 1918 entries

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

  • Best score: 24
  • Best player score: 70
  • Position: #471 / 472
  • Number of attempts: 1
Space out the alphabet - 1590 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 53
  • Position: #433 / 433
  • Number of attempts: 1
지형 유
Twitter:

entered into 15 challenges

contributed 0 challenges