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

Resort and deup a CSV list - 122 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: 44
  • Number of attempts: 3
calculations - 148 entries

Complete these (weird) calculations.

  • Best score: 38
  • Best player score: 39
  • Number of attempts: 1
Simple format (2) - 253 entries

try again!

  • Best score: 23
  • Best player score: 24
  • Number of attempts: 5
Box it - 4199 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 3
Build a six - 239 entries

Just enjoy building "a" floors...

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 2
Two pairs of cluster of letters creates word - 506 entries

Clean and group.

  • Best score: 17
  • Best player score: 21
  • Number of attempts: 1
Flip the bit - 84 entries

Change the specific 0 to a 1.

  • Best score: 8
  • Best player score: 10
  • Number of attempts: 1
ninja substitution - 754 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 1
One to Ten - 1273 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: 12
  • Number of attempts: 1
comment and uncomment code inline - 856 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 1
Convert Application Output to CSV - 132 entries

Change the application output to comma-separated values

  • Best score: 17
  • Best player score: 19
  • Number of attempts: 1
Unsemantic linewrapping - 464 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: 10
  • Number of attempts: 1
Letterbox - 71 entries

Make a box!

  • Best score: 35
  • Best player score: 49
  • Number of attempts: 2
Triangular Numbers - 59 entries

Generate the first 50 triangular numbers.

  • Best score: 18
  • Best player score: 31
  • Number of attempts: 3
Swap values inside brackets - 1733 entries

Easy challenge.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 1
Every other line - 2232 entries

AaAaAaA

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 1
simple format (3) - 43 entries

reverse two column values!

  • Best score: 34
  • Best player score: 47
  • Number of attempts: 1
Increment each number - 593 entries

Increment each number individually by one

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 4
One number per line - 14126 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 3
Roger Stoltz
Twitter:

entered into 19 challenges

contributed 0 challenges