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

Replace word while reserving first letter case - 489 entries

Window -> Door window -> door Windows -> Windows windows -> windows

  • Best score: 24
  • Best player score: 28
  • Position: #31 / 105
  • Number of attempts: 2
months to html list items - 826 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 27
  • Position: #123 / 222
  • Number of attempts: 2
Quicksort - 1757 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 7
  • Position: #137 / 385
  • Number of attempts: 7
EDN reformat - 1099 entries

The goal is to make the code more readable and concise while maintaining its functionality.

  • Best score: 17
  • Best player score: 24
  • Position: #98 / 153
  • Number of attempts: 5
Pick and sort servers from mirror list - 379 entries

Retrieve the primary server for each country from a mirror list file and organize them alphabetically by country name. Given a mirror list file containing server information for various countries, the objective is to extract the primary server from each country and then arrange these servers in alphabetical order based on the respective country names.

  • Best score: 28
  • Best player score: 32
  • Position: #36 / 81
  • Number of attempts: 3
Populate 3D bone names list - 525 entries

Ran into this at work, excited to see how this gets optimized

  • Best score: 21
  • Best player score: 28
  • Position: #70 / 141
  • Number of attempts: 3
Find fix point of cos - 1204 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 15
  • Position: #198 / 365
  • Number of attempts: 2
Insert column data on Confluence-style table - 442 entries

Add ip addresses into new "IP" column based on the last digits from the "Server" column

  • Best score: 33
  • Best player score: 41
  • Position: #37 / 105
  • Number of attempts: 4
Surround the 'z' character with brackets, quotes, and print as formatted string. - 507 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 17
  • Position: #186 / 287
  • Number of attempts: 1
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: #89 / 523
  • Number of attempts: 9
Filter number combinations that don't add to 11 - 379 entries

Append the sum of each line to its end, alongside an equals sign, and remove any that do not sum to 11. The ordering of lines should stay the same. Note that the combinations are semi-arbitrary and not all 4-number combinations are present in the file.

  • Best score: 27
  • Best player score: 27
  • Position: #39 / 112
  • Number of attempts: 5
Tabbed Table to Python Array - 652 entries

Not payed by the hour? So make it fast ;-) The table contains the relative occurencies of bigrams (two consecutive letters) in 1/100,000 in the german language, copy-pasted from http://www.mathe.tu-freiberg.de/~hebisch/cafe/kryptographie/bigramme.html

  • Best score: 50
  • Best player score: 60
  • Position: #82 / 171
  • Number of attempts: 2
HS exam question - 1523 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 81
  • Position: #262 / 404
  • Number of attempts: 1
Reformat symbols in list - 1507 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 27
  • Position: #160 / 334
  • Number of attempts: 3
Fizzbuzz - 539 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 105
  • Position: #137 / 162
  • Number of attempts: 1
Substraction (bis) - 582 entries

Solve the equations (adapted from the original @Caek_'s challenge).

  • Best score: 21
  • Best player score: 31
  • Position: #60 / 110
  • Number of attempts: 2
Changing around text with citations - 324 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 41
  • Position: #59 / 90
  • Number of attempts: 2
Poorly indented Python comments - 1275 entries

Fix the alignment of some Python comments as quickly as possible.

  • Best score: 15
  • Best player score: 15
  • Position: #46 / 213
  • Number of attempts: 12
Many duplicates - 1350 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #367 / 440
  • 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: 54
  • Position: #96 / 148
  • Number of attempts: 1
delete swap - 1650 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #316 / 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: 40
  • Position: #107 / 260
  • Number of attempts: 3
Wikitext headings to markdown - 985 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #48 / 207
  • Number of attempts: 7
Plotting some variables in python - 1605 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: 37
  • Position: #102 / 345
  • Number of attempts: 8
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: 27
  • Position: #4052 / 7384
  • Number of attempts: 1
Copy three lines - 2869 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 17
  • Position: #297 / 639
  • Number of attempts: 3
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: #108 / 173
  • Number of attempts: 1
Vice versa - 7865 entries

Little role switching.

  • Best score: 12
  • Best player score: 13
  • Position: #852 / 2114
  • Number of attempts: 4
Maze path - 38 entries

Follow the given motions and mark your path with Xs. Attention: This maze is quite big (20x20), please set your terminal size to at least 82.

  • Best score: 25
  • Best player score: 47
  • Position: #10 / 16
  • Number of attempts: 1
Line under headers - 2023 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #202 / 498
  • 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: #26 / 61
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10652 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 13
  • Position: #2610 / 3677
  • Number of attempts: 1
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: #364 / 1073
  • Number of attempts: 3
Make it more readable - 1955 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 14
  • Position: #201 / 643
  • Number of attempts: 5
Sort and add attributes - 1369 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #272 / 542
  • Number of attempts: 2
Anaritus
Github:

entered into 35 challenges

contributed 0 challenges