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

Remove adjacent duplicates - 350 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 52
  • Position: #92 / 101
  • Number of attempts: 1
Deleting text - 217 entries

Delete everything except some specific numbers.

  • Best score: 26
  • Best player score: 61
  • Position: #66 / 73
  • Number of attempts: 1
Quicksort - 1875 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 29
  • Position: #297 / 411
  • Number of attempts: 1
Tic-Tac-Toe Grid Transformation - 381 entries

Your mission is to efficiently convert the original Tic-Tac-Toe grid, represented by 'x's and 'o's, into a neat and well-organized game board.

  • Best score: 56
  • Best player score: 111
  • Position: #37 / 82
  • Number of attempts: 9
Remove line numbers - 694 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 9
  • Best player score: 47
  • Position: #167 / 189
  • Number of attempts: 1
Find fix point of cos - 1339 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 14
  • Position: #38 / 390
  • Number of attempts: 4
Insert column data on Confluence-style table - 445 entries

Add ip addresses into new "IP" column based on the last digits from the "Server" column

  • Best score: 33
  • Best player score: 71
  • Position: #78 / 107
  • Number of attempts: 3
swap number pairs - 2066 entries

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

  • Best score: 16
  • Best player score: 28
  • Position: #214 / 377
  • Number of attempts: 2
Simple, Practical, and Common - 33571 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: 27
  • Position: #3989 / 7405
  • Number of attempts: 5
One number per line - 18709 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 23
  • Position: #3055 / 3856
  • Number of attempts: 6
Unsemantic linewrapping - 925 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
  • Position: #115 / 229
  • Number of attempts: 10
Add semicolons - 10845 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 13
  • Position: #1974 / 3060
  • Number of attempts: 2
Bad Copy Syntax - 2028 entries

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

  • Best score: 18
  • Best player score: 31
  • Position: #432 / 522
  • Number of attempts: 5
Box it - 7902 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 27
  • Position: #1146 / 1874
  • Number of attempts: 3
Reformat Cura settings - 132 entries

Cura settings are weirdly encoded... After mere replacements, you'll have to enquote two strings (infill_pattern & speed_travel) and dont forget booleans in lowercase. #format #json

  • Best score: 50
  • Best player score: 79
  • Position: #22 / 24
  • Number of attempts: 3
Stefan Krist
Twitter:

Linux nerd. Generally amazing! I work for @AWSCloud & my opinions are my own.

entered into 15 challenges

contributed 0 challenges