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

Vertical Limit - 2167 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
abcd > a b c d - 241 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 23
  • Number of attempts: 1
Assignment Alignment - 703 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 34
  • Number of attempts: 1
Simple, Practical, and Common - 26754 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: 22
  • Number of attempts: 6
Reverse and double space - 411 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 21
  • Number of attempts: 2
The name of the game - 587 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Vim's not included features - 157 entries

Filter not included (-) features in a hypothetical installation of vim.

  • Best score: 23
  • Best player score: 33
  • Number of attempts: 1
switch variable - 4443 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 6
V to the i - 4104 entries

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

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
Reverse characters in a line - 585 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 1
Mirror Symmetry - 716 entries

Add backslashes.

  • Best score: 7
  • Best player score: 10
  • Number of attempts: 3
Add to end of each line... kinda - 265 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
Numbering a List - 1752 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Number of attempts: 2
imports alignment (python) - 577 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 20
  • Number of attempts: 2
camel riding - 697 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 5
Basic renumbering - 4829 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 5
Words in parens - 11368 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 4
A Simple One - 849 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: 2
I forgot quotes - 12699 entries

Oops.

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 4
The meaning - 503 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 2
Change the content of a string - 1250 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 24
  • 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: 12
  • Number of attempts: 1
Parsing with CSV: Unify lines and result. - 162 entries

col1;col2;col3;col4 A;1;4;5 A;3;4; A;1;4; # New output: col1;col2;col3;col4 A;1(2x);3;4(3x);5 any ideas?

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 1
quotes inside quotes - 2834 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: 14
  • Best player score: 14
  • Number of attempts: 9
Just the middle - 9664 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
Append semicolon after expressions - 880 entries

Some lines need the semicolon, some don't.

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

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
Swap assigned value - 499 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 3
-a-b-c- - 2689 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 4
Reverse Simple Deletion - 721 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 9715 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Switch function arguments - 1852 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 1
Pairs of numbers - 325 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 36
  • Number of attempts: 1
Don't know what this is - 1805 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: 11
  • Number of attempts: 5
Extract argument from function - 2049 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
Vice versa - 6242 entries

Little role switching.

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 9
NuM
Twitter:

entered into 36 challenges

contributed 0 challenges