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

Inconsistent real estate paste - 142 entries

Format a hand-typed real estate listing that uses inconsistent punctuation into four sections

  • Best score: 24
  • Best player score: 45
  • Number of attempts: 2
Logging with key - 275 entries

Sometimes it is better to log with meaningful key

  • Best score: 21
  • Best player score: 38
  • Number of attempts: 1
convert yml into java pojo field - 687 entries

How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file

  • Best score: 29
  • Best player score: 29
  • Number of attempts: 4
multiple cursor alternative - 1143 entries

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

  • Best score: 19
  • Best player score: 26
  • Number of attempts: 2
Simple, Practical, and Common - 26150 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: 14
  • Best player score: 22
  • Number of attempts: 4
Do you demand a shrubbery? - 1018 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 20
  • Number of attempts: 1
From argument to object - 1121 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 19
  • Number of attempts: 1
Cleanining up 80 column concatenated text - 184 entries

1. Put the whole query on one line, remove the concatenation operators 2. Remove the double spaces that appear a few times in the query 3. Use string-interpolated variable statementPid rather than the ugly concatenation

  • Best score: 31
  • Best player score: 49
  • Number of attempts: 1
Make it more readable - 1765 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 2
Turn a ninja to case-insensitive [Nn][Ii][Nn][Jj][Aa] regexp! - 40 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: 2
Swap values - 3672 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 18
  • Number of attempts: 1
Reverse Simple Deletion - 720 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
-a-b-c- - 2670 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 1
Reformat long lines - 316 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 4
Let's play some Ivmgolf - 926 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
Array transposition - 1704 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 7
I forgot quotes - 12364 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Number of attempts: 2
Convert pandoc unordered list to a numbered list - 136 entries

I know it's possible to use #. in pandoc to auto-generate numbered lists, but then it's not easy to tell how many items there are when reading it in Markdown. How fast can you make the switch?

  • Best score: 20
  • Best player score: 25
  • Number of attempts: 1
V to the i - 4054 entries

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

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
Com(m)a Trouble - 1935 entries

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

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 5
create arrows in a list - 65 entries

Add arrow at same distance

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 1
Wrap the text of an email message to 79 characters - 495 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 2
Remove semicolons after expressions - 463 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Number of attempts: 2
Switch function arguments - 1843 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 9653 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
Swap values inside brackets - 1683 entries

Easy challenge.

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 9
7th Birthday - 163 entries

We have a bunch of numbers written from 0 to 9 in the order present in the text input file. The task is to create 7 by replacing the numbers with dashes.

  • Best score: 19
  • Best player score: 24
  • Number of attempts: 3
Just the middle - 9529 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 4
Remove noise from HTTP log - 618 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 5
Resort and deup a CSV list - 119 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: 66
  • Number of attempts: 3
Vertical Limit - 2148 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 25
  • Number of attempts: 3
Gray area - 650 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 16
  • Number of attempts: 1
unknown command - 110 entries

I want change 5 words

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 1
Every other line - 2197 entries

AaAaAaA

  • Best score: 12
  • Best player score: 17
  • Number of attempts: 3
Stairstep digits - 220 entries

Remove the evens. Double the odds.

  • Best score: 9
  • Best player score: 13
  • Number of attempts: 1
One number per line - 13706 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 10
Team names - 1498 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 5
Append semicolon after expressions - 875 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Count both ways - 880 entries

Right AND down.

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 1
Sebastian Korten
Twitter:

Somebody somewhere sometimes...

entered into 39 challenges

contributed 0 challenges