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 - 826 entries

Turn the months into list items.

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

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 62
  • Position: #15 / 92
  • Number of attempts: 2
Paste a column after a column - 2413 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 / 523
  • Number of attempts: 1
2 quick changes and a numbered list - 615 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: #59 / 148
  • Number of attempts: 2
delete swap - 1650 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #317 / 514
  • Number of attempts: 1
Generate a very basic Python constructor (fixed) - 1231 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 / 260
  • Number of attempts: 16
Visual block training - 1047 entries

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

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

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

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

To convert a CSV list to Markdown list

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

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #70 / 316
  • Number of attempts: 5
Simple, Practical, and Common - 33483 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 / 7384
  • Number of attempts: 2
Wget failed to download redirections - 185 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: #15 / 64
  • Number of attempts: 3
Extended Customer 2 - 49 entries

Format the chars

  • Best score: 47
  • Best player score: 59
  • Position: #5 / 21
  • Number of attempts: 3
Basic renumbering - 5605 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 12
  • Position: #303 / 1260
  • Number of attempts: 1
Create Leading Zeros - 239 entries

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

  • Best score: 23
  • Best player score: 23
  • Position: #9 / 81
  • Number of attempts: 6
Add to end of each line... kinda - 329 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 / 173
  • Number of attempts: 1
JSON string rotation - 56 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 / 20
  • Number of attempts: 4
Vice versa - 7865 entries

Little role switching.

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

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

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

Basic comment reformatting

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

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

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

Make this simple sudoku table look nice and legible.

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

Seperate named with equal tabs.

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

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 12
  • Position: #13 / 71
  • Number of attempts: 4
Assign numbers to fields - 107 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 / 61
  • Number of attempts: 1
Entries sort - 82 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: #22 / 39
  • Number of attempts: 1
Collect List - 4267 entries

Convert to comma separated list.

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

Try to swap or reverse the line as needed.

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

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 19
  • Position: #133 / 150
  • Number of attempts: 2
Interleave lines - 159 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: #12 / 59
  • Number of attempts: 10
Merge blank lines and properly capitalize - 82 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 / 24
  • Number of attempts: 9
Fix the XML - 1000 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #64 / 287
  • Number of attempts: 6
Line 'em up! - 396 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: #56 / 112
  • Number of attempts: 1
Remove hard line breaks - 68 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: #12 / 33
  • Number of attempts: 1
Greek column realign - 51 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: 19
  • Best player score: 26
  • Position: #18 / 25
  • Number of attempts: 6
Sorting database text output - 220 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 / 82
  • Number of attempts: 6
Test everything! - 163 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: #10 / 53
  • Number of attempts: 3
Condensed Cases - 794 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: #100 / 244
  • Number of attempts: 6
Pretty format for variable declarations - 156 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #24 / 63
  • Number of attempts: 1
Happy TvvO - 417 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #181 / 204
  • Number of attempts: 1
I forgot quotes - 15946 entries

Oops.

  • Best score: 10
  • Best player score: 11
  • Position: #1240 / 4166
  • Number of attempts: 4
learn vim in short time - 233 entries

so happy to learn vim.because vim is awesome

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

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #734 / 1132
  • Number of attempts: 1
Count both ways - 1006 entries

Right AND down.

  • Best score: 13
  • Best player score: 15
  • Position: #133 / 352
  • Number of attempts: 2
Suffix sort - 255 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 / 66
  • Number of attempts: 10
Five Pillars - 63 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: #6 / 24
  • Number of attempts: 2
Going underground.... - 349 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 / 127
  • Number of attempts: 9
A HAPPY NEW YEAR 2014 ! - 10652 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2506 / 3677
  • Number of attempts: 2
quotes inside quotes - 3128 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 / 1073
  • Number of attempts: 1
Number an outline - 252 entries

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

  • Best score: 25
  • Best player score: 34
  • Position: #22 / 76
  • Number of attempts: 3
Pairs of numbers - 361 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: #37 / 134
  • Number of attempts: 11
Tiny column alignment - 47 entries

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

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

Maybe a simple challenge.

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

entered into 54 challenges

contributed 0 challenges