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

Inverting Lines - 709 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 10
  • Position: #24 / 200
  • Number of attempts: 7
Replace pattern with 1, 2, 3, ... on each line - 898 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 22
  • Position: #38 / 184
  • Number of attempts: 5
Simple, Practical, and Common - 32746 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
  • Position: #2143 / 7235
  • Number of attempts: 4
Hogwarts Email Sorting - 784 entries

Given a list of emails, get the students full name and their associated house.

  • Best score: 20
  • Best player score: 21
  • Position: #72 / 225
  • Number of attempts: 7
prepend * to every non-blank line - 5776 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 10
  • Position: #125 / 1421
  • Number of attempts: 18
One number per line - 18240 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2208 / 3760
  • Number of attempts: 14
Right Align Part of the line - 55 entries

The challenge is to right align a part of the line - this is useful in some SQL queries where it's more clear which are the fields displayed

  • Best score: 19
  • Best player score: 23
  • Position: #22 / 24
  • Number of attempts: 1
Applying same text modification in several lines - 2699 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 14
  • Position: #422 / 803
  • Number of attempts: 5
Add semicolons - 10429 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1358 / 2954
  • Number of attempts: 6
Bad Copy Syntax - 1882 entries

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

  • Best score: 18
  • Best player score: 29
  • Position: #387 / 478
  • Number of attempts: 2
remove lines containing the word "reader" - 3419 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #386 / 1108
  • Number of attempts: 4
Com(m)a Trouble - 3284 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #111 / 741
  • Number of attempts: 16
Box it - 7622 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 24
  • Position: #894 / 1819
  • Number of attempts: 6
Cool or not? - 738 entries

abc trying to be cool or not...

  • Best score: 15
  • Best player score: 20
  • Position: #150 / 212
  • Number of attempts: 3
From argument to object - 1250 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: 20
  • Position: #306 / 412
  • Number of attempts: 3
Two pairs of cluster of letters creates word - 691 entries

Clean and group.

  • Best score: 17
  • Best player score: 29
  • Position: #138 / 160
  • Number of attempts: 1
Every other line - 2773 entries

AaAaAaA

  • Best score: 12
  • Best player score: 12
  • Position: #63 / 676
  • Number of attempts: 14
Search and Replace 0 - 4534 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 12
  • Position: #647 / 1507
  • Number of attempts: 3
That hyphen - 2464 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 14
  • Position: #569 / 674
  • Number of attempts: 2
Just the middle - 11074 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3001 / 4088
  • Number of attempts: 3
Team names - 1754 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 19
  • Position: #444 / 564
  • Number of attempts: 1
Basic renumbering - 5393 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 24
  • Position: #1088 / 1218
  • Number of attempts: 5
Line under headers - 1852 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 29
  • Position: #238 / 459
  • Number of attempts: 3
Around the clock - 167 entries

You'll want to use 2 special commands to complete this. If you haven't yet, read through 'input.txt', especially :help simple-changes

  • Best score: 13
  • Best player score: 17
  • Position: #61 / 65
  • Number of attempts: 1
Delete to the end of the current line - 708 entries

Delete to the end of the current line, but keep the character under the cursor.

  • Best score: 5
  • Best player score: 5
  • Position: #220 / 346
  • Number of attempts: 4
Collect List - 4146 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #849 / 1159
  • Number of attempts: 1
I forgot quotes - 15639 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1911 / 4095
  • Number of attempts: 15
-a-b-c- - 3077 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #999 / 1099
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10507 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 17
  • Position: #3353 / 3626
  • Number of attempts: 1
attr_aligner - 3347 entries

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

  • Best score: 19
  • Best player score: 25
  • Position: #237 / 677
  • Number of attempts: 10
quotes inside quotes - 2996 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: 3
  • Best player score: 17
  • Position: #908 / 1037
  • Number of attempts: 1
Words in parens - 12678 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2467 / 3904
  • Number of attempts: 1
replacing each line of a block selection - 2740 entries

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

  • Best score: 18
  • Best player score: 28
  • Position: #576 / 724
  • Number of attempts: 2
switch variable - 4863 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1210 / 1688
  • Number of attempts: 8
Shebangs for all - 1719 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 25
  • Position: #439 / 458
  • Number of attempts: 5
Reverse Simple Deletion - 739 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #341 / 418
  • Number of attempts: 1
Simple text editing with Vim - 11365 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #624 / 3337
  • Number of attempts: 4
Quentin Leroy
Twitter:

Computer Vision.

entered into 37 challenges

contributed 0 challenges