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

months to html list items - 551 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 22
  • Position: #9 / 154
  • Number of attempts: 5
Easier Align - 344 entries

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 62
  • Position: #15 / 89
  • Number of attempts: 2
Paste a column after a column - 2243 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 14
  • Best player score: 14
  • Position: #91 / 487
  • Number of attempts: 1
2 quick changes and a numbered list - 599 entries

The ascii will not be lost, but rather numbered in 4 digit blocks with leading zeros.

  • Best score: 37
  • Best player score: 41
  • Position: #57 / 145
  • Number of attempts: 2
delete swap - 1522 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #317 / 476
  • Number of attempts: 1
Generate a very basic Python constructor (fixed) - 1175 entries

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

  • Best score: 29
  • Best player score: 29
  • Position: #61 / 246
  • Number of attempts: 16
Visual block training - 1001 entries

You see the input. You see the output. Go.

  • Best score: 17
  • Best player score: 17
  • Position: #10 / 183
  • Number of attempts: 2
Inverting Lines - 1832 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #221 / 497
  • Number of attempts: 1
CSV to MD format - 388 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 40
  • Position: #30 / 91
  • Number of attempts: 6
Making 3 line function a one liner. - 305 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #170 / 194
  • Number of attempts: 1
Modernise code - 1333 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #70 / 307
  • 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: #2394 / 7364
  • Number of attempts: 2
Wget failed to download redirections - 184 entries

Output of a wget session, where 302 where not properly handled due to certificate problems, has been saved to a file. Keep the correct URLs to start again downloading.

  • Best score: 15
  • Best player score: 16
  • Position: #14 / 63
  • Number of attempts: 3
Extended Customer 2 - 47 entries

Format the chars

  • Best score: 47
  • Best player score: 59
  • Position: #4 / 20
  • Number of attempts: 3
Basic renumbering - 5587 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 12
  • Position: #301 / 1258
  • Number of attempts: 1
Create Leading Zeros - 238 entries

Create leading zeros only for id columns. Please use generic approach!

  • Best score: 23
  • Best player score: 23
  • Position: #9 / 80
  • Number of attempts: 6
Add to end of each line... kinda - 325 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: 12
  • Position: #109 / 171
  • Number of attempts: 1
JSON string rotation - 55 entries

Right value strings are misplaced. Just rotate them! I'm too kind with you guys and didn't included "strings with \" in it"!

  • Best score: 19
  • Best player score: 19
  • Position: #7 / 19
  • Number of attempts: 4
Vice versa - 7803 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #619 / 2100
  • Number of attempts: 8
Vim's not included features - 210 entries

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

  • Best score: 23
  • Best player score: 23
  • Position: #8 / 62
  • Number of attempts: 11
comments galore - 998 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Position: #302 / 418
  • Number of attempts: 1
Replace and keep the case - 407 entries

Replace all instance of plugin and Plugin to device and Device.

  • Best score: 26
  • Best player score: 26
  • Position: #55 / 115
  • Number of attempts: 2
Sudoku table - 70 entries

Make this simple sudoku table look nice and legible.

  • Best score: 48
  • Best player score: 48
  • Position: #4 / 31
  • Number of attempts: 8
Separating firstname & lastname - 120 entries

Seperate named with equal tabs.

  • Best score: 19
  • Best player score: 19
  • Position: #7 / 55
  • Number of attempts: 3
Restore order to the alphabet - 188 entries

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 12
  • Position: #13 / 68
  • Number of attempts: 4
Assign numbers to fields - 105 entries

You are given a list of space-separated strings. Add an increasing numeric prefix to each one.

  • Best score: 19
  • Best player score: 19
  • Position: #27 / 59
  • Number of attempts: 1
Entries sort - 81 entries

It cames to my mind a weird idea : sorting parts of my .vimrc. Take few minutes to sort out this, it's easy !

  • Best score: 14
  • Best player score: 15
  • Position: #21 / 38
  • Number of attempts: 1
Collect List - 4264 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #528 / 1186
  • Number of attempts: 1
swap or reverse - 115 entries

Try to swap or reverse the line as needed.

  • Best score: 16
  • Best player score: 16
  • Position: #54 / 66
  • Number of attempts: 3
readability - 312 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 19
  • Position: #132 / 148
  • Number of attempts: 2
Interleave lines - 158 entries

This is some kind of « paste -d'\n' c b a ». There are many ways to achieve this.. just find the shortest!

  • Best score: 17
  • Best player score: 18
  • Position: #11 / 58
  • Number of attempts: 10
Merge blank lines and properly capitalize - 81 entries

Here you need complete 2 tasks: 1. Remove all unwanted continuous blank lines and leave only 1 blank line between paragraphs. 2. Properly capitalize the sentences.

  • Best score: 21
  • Best player score: 21
  • Position: #4 / 23
  • Number of attempts: 9
Fix the XML - 996 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #64 / 284
  • Number of attempts: 6
Line 'em up! - 392 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

  • Best score: 17
  • Best player score: 18
  • Position: #55 / 110
  • Number of attempts: 1
Remove hard line breaks - 67 entries

Text files with Hard breaks are not good for e-readers. We need remove all hard line breaks and have long lines.

  • Best score: 10
  • Best player score: 13
  • Position: #11 / 32
  • Number of attempts: 1
Greek column realign - 48 entries

Oops one letter is missing! Shift down the second column to insert nu letter. Symbol can be entered using: <C-K>n*

  • Best score: 21
  • Best player score: 26
  • Position: #17 / 24
  • Number of attempts: 6
Sorting database text output - 219 entries

Sometimes it is nice to be able to quickly take column-formatted text output from the SQL command line and turn it into a list of useful data. In this case we want a unique, sorted list of the values from the second column combined into one comma-separated list. What is the fewest strokes you can do this in?

  • Best score: 24
  • Best player score: 24
  • Position: #39 / 81
  • Number of attempts: 6
Test everything! - 162 entries

... and build the desired input data structure. Transform a list of values into a non-trivial format.

  • Best score: 22
  • Best player score: 23
  • Position: #9 / 52
  • Number of attempts: 3
Condensed Cases - 788 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 13
  • Position: #98 / 242
  • Number of attempts: 6
Pretty format for variable declarations - 155 entries

Project standards demand the equal signs must be aligned for better readability.

  • Best score: 13
  • Best player score: 14
  • Position: #23 / 62
  • Number of attempts: 1
Happy TvvO - 407 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 13
  • Position: #179 / 201
  • Number of attempts: 1
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 11
  • Position: #1239 / 4161
  • Number of attempts: 4
learn vim in short time - 232 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #129 / 158
  • Number of attempts: 1
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #732 / 1129
  • Number of attempts: 1
Count both ways - 1001 entries

Right AND down.

  • Best score: 13
  • Best player score: 15
  • Position: #132 / 351
  • Number of attempts: 2
Suffix sort - 254 entries

Sort from the end of the line, as if the letters in each line were reversed.

  • Best score: 19
  • Best player score: 19
  • Position: #10 / 65
  • Number of attempts: 10
Five Pillars - 62 entries

Arrange all words in a table with 5 columns. The minimal space between words in columns is 2 spaces. Columns do have varying width.

  • Best score: 41
  • Best player score: 43
  • Position: #5 / 23
  • Number of attempts: 2
Going underground.... - 339 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

  • Best score: 22
  • Best player score: 23
  • Position: #7 / 125
  • Number of attempts: 9
A HAPPY NEW YEAR 2014 ! - 10624 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2501 / 3666
  • Number of attempts: 2
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: 14
  • Position: #365 / 1072
  • Number of attempts: 1
Number an outline - 249 entries

The indent and words are right, but the numbers are all wrong.

  • Best score: 25
  • Best player score: 34
  • Position: #21 / 75
  • Number of attempts: 3
Pairs of numbers - 360 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: 28
  • Position: #36 / 133
  • Number of attempts: 11
Tiny column alignment - 45 entries

Align using the four blocks, don't forget to lowercase and have fun!

  • Best score: 33
  • Best player score: 33
  • Position: #6 / 20
  • Number of attempts: 4
Sort the cardinal numbers - 293 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Position: #58 / 146
  • Number of attempts: 1
Berel94
Github:

entered into 54 challenges

contributed 0 challenges