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

Fill in the chess board - 905 entries

Fill in the name of each square using its file (a-h) and rank (1-8).

  • Best score: 19
  • Best player score: 20
  • Position: #38 / 175
  • Number of attempts: 19
Plotting some variables in python - 1567 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 47
  • Position: #172 / 334
  • Number of attempts: 4
Transpose a python matrix - 845 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 61
  • Position: #94 / 134
  • Number of attempts: 1
Increment number for every 10 lines - 219 entries

The file consists of 2 columns (code and percentage). We need to add 2 more columns with increasing number for 4th column (Xcols) and increment 3rd column (Ycols) only for every 10 lines with reset of 4th column

  • Best score: 25
  • Best player score: 68
  • Position: #47 / 61
  • Number of attempts: 1
simple replacements - 1662 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 23
  • Position: #186 / 371
  • Number of attempts: 3
Inverting Lines - 1837 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #24 / 498
  • Number of attempts: 11
Python dataclasses - 1104 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 20
  • Position: #89 / 277
  • Number of attempts: 4
swap number pairs - 2011 entries

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

  • Best score: 16
  • Best player score: 37
  • Position: #297 / 370
  • Number of attempts: 1
Rural Post - 4368 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 10
  • Position: #422 / 1072
  • Number of attempts: 5
Satisfy the go linter - 2329 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 28
  • Position: #336 / 457
  • Number of attempts: 1
Multiline to Single Line - 668 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 6
  • Position: #253 / 292
  • Number of attempts: 2
Replace pattern with 1, 2, 3, ... on each line - 1098 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: #47 / 225
  • Number of attempts: 5
Simple, Practical, and Common - 33385 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: #2142 / 7364
  • Number of attempts: 4
Hogwarts Email Sorting - 877 entries

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

  • Best score: 20
  • Best player score: 21
  • Position: #80 / 254
  • Number of attempts: 7
prepend * to every non-blank line - 6208 entries

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

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

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2265 / 3842
  • Number of attempts: 14
Right Align Part of the line - 117 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: #35 / 38
  • Number of attempts: 1
Applying same text modification in several lines - 2845 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #449 / 840
  • Number of attempts: 5
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1392 / 3044
  • Number of attempts: 6
Bad Copy Syntax - 2001 entries

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

  • Best score: 18
  • Best player score: 29
  • Position: #418 / 516
  • Number of attempts: 2
remove lines containing the word "reader" - 3537 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #385 / 1144
  • Number of attempts: 4
Com(m)a Trouble - 3675 entries

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

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

Create a box around a line.

  • Best score: 21
  • Best player score: 24
  • Position: #925 / 1865
  • Number of attempts: 6
Cool or not? - 793 entries

abc trying to be cool or not...

  • Best score: 15
  • Best player score: 20
  • Position: #159 / 226
  • Number of attempts: 3
From argument to object - 1474 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: #337 / 450
  • Number of attempts: 3
Two pairs of cluster of letters creates word - 735 entries

Clean and group.

  • Best score: 17
  • Best player score: 29
  • Position: #151 / 174
  • Number of attempts: 1
Every other line - 2886 entries

AaAaAaA

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

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

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

"vim vi improved"

  • Best score: 9
  • Best player score: 14
  • Position: #585 / 695
  • Number of attempts: 2
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3035 / 4164
  • Number of attempts: 3
Team names - 1805 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 19
  • Position: #457 / 581
  • Number of attempts: 1
Basic renumbering - 5587 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 24
  • Position: #1125 / 1258
  • Number of attempts: 5
Line under headers - 2004 entries

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

  • Best score: 24
  • Best player score: 29
  • Position: #261 / 496
  • Number of attempts: 3
Around the clock - 188 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: #70 / 74
  • Number of attempts: 1
Delete to the end of the current line - 791 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 / 385
  • Number of attempts: 4
Collect List - 4264 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #868 / 1186
  • Number of attempts: 1
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1937 / 4161
  • Number of attempts: 15
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #1025 / 1129
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10624 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 17
  • Position: #3393 / 3666
  • Number of attempts: 1
attr_aligner - 3444 entries

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

  • Best score: 19
  • Best player score: 25
  • Position: #246 / 692
  • Number of attempts: 10
quotes inside quotes - 3125 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: 17
  • Position: #935 / 1072
  • Number of attempts: 1
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2498 / 3946
  • Number of attempts: 1
replacing each line of a block selection - 2947 entries

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

  • Best score: 18
  • Best player score: 28
  • Position: #607 / 768
  • Number of attempts: 2
switch variable - 5036 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1243 / 1736
  • Number of attempts: 8
Shebangs for all - 1912 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: #474 / 500
  • Number of attempts: 5
Reverse Simple Deletion - 832 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #352 / 454
  • Number of attempts: 1
Simple text editing with Vim - 12290 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 / 3581
  • Number of attempts: 4
Quentin Leroy
Twitter:

Computer Vision.

entered into 47 challenges

contributed 0 challenges