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

Piphilology - 106 entries

Piphilology comprises the creation and use of mnemonic techniques to remember a span of digits of the mathematical constant π. http://en.wikipedia.org/wiki/Piphilology

  • Best score: 29
  • Best player score: 38
  • Number of attempts: 1
Todo list specification - 264 entries

The every item on the todo list must be done today. Modify the list to reflect that.

  • Best score: 37
  • Best player score: 37
  • Number of attempts: 1
Subnetting - 54 entries

Split up the IP addresses in the right way.

  • Best score: 29
  • Best player score: 36
  • Number of attempts: 3
SQL to YAML - 32 entries

Should be easy with vim, or not?

  • Best score: 72
  • Best player score: 88
  • Number of attempts: 1
Do you demand a shrubbery? - 955 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 32
  • Number of attempts: 1
Scrambled numbers - 672 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 28
  • Number of attempts: 2
Array propagate - 199 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 25
  • Number of attempts: 3
Change attribute to getter - 83 entries

Wrap attributes with a getter method.

  • Best score: 24
  • Best player score: 24
  • Number of attempts: 1
Whitespace, empty lines and tabs - 2433 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 24
  • Number of attempts: 1
Extract HTML option values from tag values - 73 entries

Generate HTML option values from the text in the option tag. If the text contains multiple words, replace the spaces with an underscore and convert all capital letters to small letters.

  • Best score: 34
  • Best player score: 37
  • Number of attempts: 1
Simple, Practical, and Common - 19708 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: 13
  • Best player score: 23
  • Number of attempts: 3
Across-Down Flip - 37 entries

Do this instead of the Sunday crossword.

  • Best score: 24
  • Best player score: 27
  • Number of attempts: 1
Alsa configuration - 438 entries

I'm tweaking my ~/.asoundrc file!

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 6
multiple cursor alternative - 814 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: 21
  • Number of attempts: 1
Array transposition - 1141 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 20
  • Number of attempts: 2
attr_aligner - 2710 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 20
  • Number of attempts: 4
Simple text editing with Vim - 9723 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 1
Com(m)a Trouble - 124 entries

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

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 2
Paragraph breaks - 376 entries

Swap the blank lines and the aaa lines.

  • Best score: 10
  • Best player score: 13
  • Number of attempts: 1
Swap values - 2957 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 4
Vice versa - 5076 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 4
Generate a list of numbers - 213 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 1
Free hyphen! - 107 entries

Just like "Inner hyphens", but I'm giving you a free hyphen to play with. Will your solution be any different?

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
Letter case trickery - 1375 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 11
  • Number of attempts: 6
Just the middle - 8223 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
Fix the XML - 803 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 24
  • Number of attempts: 1
Paragraph sort - 287 entries

My large herbivorous mammals, Vim commands, and POSIX utilities need to be sorted separately.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 2
V to the i - 3389 entries

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

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
Combines all items - 221 entries

For each line that starts with the same number I want to combine its contents

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
Don't know what this is - 1542 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 2
replacing each line of a block selection - 2304 entries

replace each line's ../assets/js with /javascripts

  • Best score: 17
  • Best player score: 18
  • Number of attempts: 2
ASCII Art - 67 entries

how good are you with simple regex?

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 1
Create a table - 198 entries

Convert the given input into a formatted table

  • Best score: 16
  • Best player score: 19
  • Number of attempts: 1
Shuffle puzzle - 284 entries

Sort the lines in each indent group, and sort the groups. That's the pattern. Or just move lines around manually to get a better score.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 1
Fiddle percentages into real numbers - 640 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
Sorting a glossary - 98 entries

Sort a glossary. Glossary head contains a header phrase ending with ':' and glossary body has multi line text indented with a tab.

  • Best score: 6
  • Best player score: 6
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 5289 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 32
  • Best player score: 35
  • Number of attempts: 3
For all cases. - 89 entries

In this case... change it! :) Watch the line.

  • Best score: 8
  • Best player score: 8
  • Number of attempts: 1
A Simple One - 799 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
Words in parens - 10118 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 1
Minimalist Limerick - 441 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 32
  • Number of attempts: 5
Start coding format - 114 entries

I used to start coding with following format: int main(){ -(cursor here) }

  • Best score: 22
  • Best player score: 24
  • Number of attempts: 1
I forgot quotes - 9642 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 3
Where should I put the Newline? - 776 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 1
Split line with dots - 1648 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 4
switch variable - 4005 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 3
Simple addition - 207 entries

The right side of the equation is already there. We just need the left one now.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 8842 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 2
Space out the alphabet - 1211 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 1
Gray area - 601 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 3
Fun With The Diagonal - 72 entries

change the lowercase characters on the main diagonal to uppercase

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 1
Basic renumbering - 3930 entries

Renumbering Basic.

  • Best score: 2
  • Best player score: 14
  • Number of attempts: 4
camel riding - 663 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 2
-a-b-c- - 2279 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 2
Hello ${world} - 193 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

  • Best score: 24
  • Best player score: 26
  • Number of attempts: 1
Missing Library and a Typo - 535 entries

I forgot to add a c library, please add it for me. Also I'm bad at typing so fix my typo too.

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 3
Separate the lines - 116 entries

Every other line is mixed up. Separate them into their original texts.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 1
Sort files from hosts - 119 entries

Resume files by host. I hope you enjoy with this challenge

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 1
Mirrored text - 149 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 2
Swap values inside brackets - 474 entries

Easy challenge.

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 2
Team names - 1097 entries

The team names are misspelled.

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 2
underscore_to_camelCase - 134 entries

Pointy haired boss decided we need to switch to camelCase. Let's get this over with.

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 1
One number per line - 9664 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 4
From A to B - 473 entries

Mirror and change this text block

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 5
quotes inside quotes - 2580 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 2
  • Best player score: 14
  • Number of attempts: 2
Enharmonic Equivalents - 52 entries

Transform # and b to digraphs

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 1
Stairstep digits - 192 entries

Remove the evens. Double the odds.

  • Best score: 9
  • Best player score: 13
  • Number of attempts: 1
From argument to object - 955 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: 18
  • Number of attempts: 3
Jan Bundesmann
Twitter:

Mordor's sysadmin, Vim-Nerd, Ork, Banjo & Flöte

entered into 68 challenges

contributed 0 challenges