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

Python: Def to Lambda - 479 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #13 / 161
  • Number of attempts: 3
Rural Post - 4596 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #253 / 1122
  • Number of attempts: 7
Satisfy the go linter - 2485 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: #34 / 495
  • Number of attempts: 11
Multiline to Single Line - 754 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #64 / 322
  • Number of attempts: 1
Yo To Hello - 1155 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 10
  • Position: #186 / 536
  • Number of attempts: 1
Swap values - 4703 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Position: #517 / 1291
  • Number of attempts: 6
prepend * to every non-blank line - 6390 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #251 / 1560
  • Number of attempts: 4
One number per line - 18894 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 18
  • Position: #1554 / 3901
  • Number of attempts: 4
Unsemantic linewrapping - 947 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: 13
  • Position: #193 / 237
  • Number of attempts: 2
V to the i - 4864 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #741 / 1912
  • Number of attempts: 3
Applying same text modification in several lines - 2929 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 13
  • Position: #250 / 866
  • Number of attempts: 3
remove lines containing the word "reader" - 3646 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #435 / 1183
  • Number of attempts: 2
Box it - 7999 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Position: #773 / 1899
  • Number of attempts: 6
Just the middle - 11611 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3105 / 4252
  • Number of attempts: 3
Vice versa - 8011 entries

Little role switching.

  • Best score: 12
  • Best player score: 13
  • Position: #848 / 2153
  • Number of attempts: 5
Mirrored text - 199 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 22
  • Position: #72 / 74
  • Number of attempts: 3
Increment each number - 1067 entries

Increment each number individually by one

  • Best score: 15
  • Best player score: 21
  • Position: #182 / 260
  • Number of attempts: 1
Put the months in order - 1001 entries

Our contractor thought that months should be in alphabetical order. Put them in calendar order please.

  • Best score: 20
  • Best player score: 23
  • Position: #37 / 168
  • Number of attempts: 22
Collect List - 4333 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #488 / 1197
  • Number of attempts: 7
A HAPPY NEW YEAR 2014 ! - 10749 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2872 / 3712
  • Number of attempts: 3
switch variable - 5120 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #622 / 1761
  • Number of attempts: 4
Du Phan
Twitter:

entered into 21 challenges

contributed 0 challenges