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

Pick and sort servers from mirror list - 412 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: 38
  • Position: #45 / 85
  • Number of attempts: 1
Find fix point of cos - 1370 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: #126 / 399
  • Number of attempts: 8
Surround the 'z' character with brackets, quotes, and print as formatted string. - 542 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #244 / 302
  • Number of attempts: 1
Paste a column after a column - 2514 entries

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

  • Best score: 14
  • Best player score: 18
  • Position: #251 / 548
  • Number of attempts: 4
Reformat symbols in list - 1607 entries

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

  • Best score: 24
  • Best player score: 30
  • Position: #197 / 345
  • Number of attempts: 8
Changing around text with citations - 327 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 28
  • Position: #18 / 92
  • Number of attempts: 5
2 quick changes and a numbered list - 647 entries

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

  • Best score: 37
  • Best player score: 44
  • Position: #73 / 154
  • Number of attempts: 1
delete swap - 1773 entries

delete all swap

  • Best score: 5
  • Best player score: 10
  • Position: #447 / 549
  • Number of attempts: 1
hello-world-vimgolf - 2494 entries

Simple number generation

  • Best score: 10
  • Best player score: 14
  • Position: #545 / 706
  • Number of attempts: 1
Fill in the chess board - 956 entries

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

  • Best score: 19
  • Best player score: 27
  • Position: #68 / 183
  • Number of attempts: 4
Transpose a python matrix - 871 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 39
  • Position: #65 / 137
  • Number of attempts: 4
Lowercase first characters - 486 entries

This is the (abridged) input for Day 3 in Advent of Code 2019. The output is a format more suitable for Prolog programming: the two lines of input become two lists of pairs, joined together in a wires functor.

  • Best score: 33
  • Best player score: 36
  • Position: #74 / 182
  • Number of attempts: 2
simple replacements - 1753 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 24
  • Position: #221 / 380
  • Number of attempts: 3
Inverting Lines - 1882 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #344 / 509
  • Number of attempts: 3
Modernise code - 1388 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 38
  • Position: #118 / 319
  • Number of attempts: 7
Enumerate Bullets - 320 entries

We will need to refer to the bullet points in our document explicitly later, so we need to assign them some ID's!

  • Best score: 20
  • Best player score: 20
  • Position: #23 / 84
  • Number of attempts: 2
Easy modification of ssh config - 360 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 25
  • Position: #37 / 111
  • Number of attempts: 5
Applying same text modification in several lines - 2870 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #268 / 848
  • Number of attempts: 3
Add string initializers to an enum - 872 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 24
  • Position: #146 / 258
  • Number of attempts: 6
Bad Copy Syntax - 2028 entries

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

  • Best score: 18
  • Best player score: 25
  • Position: #378 / 522
  • Number of attempts: 3
From argument to object - 1504 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: 18
  • Position: #266 / 456
  • Number of attempts: 3
create arrows in a list - 112 entries

Add arrow at same distance

  • Best score: 10
  • Best player score: 10
  • Position: #60 / 72
  • Number of attempts: 3
ninja substitution - 1420 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 15
  • Position: #140 / 267
  • Number of attempts: 5
Python challenge - 172 entries

Change the types of the variables in the list from str to float, while keeping the truncation.

  • Best score: 31
  • Best player score: 31
  • Position: #9 / 46
  • Number of attempts: 4
Assign numbers to fields - 116 entries

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

  • Best score: 19
  • Best player score: 20
  • Position: #48 / 62
  • Number of attempts: 2
Square numbers - 123 entries

Boring math puzzle.

  • Best score: 16
  • Best player score: 25
  • Position: #22 / 42
  • Number of attempts: 4
NATO phonetic alphabet - 526 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 22
  • Position: #123 / 195
  • Number of attempts: 2
A simple change - 461 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 17
  • Position: #168 / 191
  • Number of attempts: 1
The name of the game - 665 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #278 / 360
  • Number of attempts: 1
Complete the circuit grid! - 105 entries

Continuing from the last challenge, add additional rows to the grid. Change each of the names from 'A1'...'A10' to 'B1'...'B10', 'C1'...'C10', etc, and for each new row add 0.7 to the X values in the (X Y) at the end of each line.

  • Best score: 46
  • Best player score: 52
  • Position: #9 / 30
  • Number of attempts: 8
Chucking wood - 125 entries

An exercise in compressing repetitive text. For this challenge, any entry that uses keys outside the main row (such as arrow keys, Home, End, Delete, etc.) will be removed. (Esc is OK, though you should be using C-[ anyway.)

  • Best score: 51
  • Best player score: 54
  • Position: #18 / 48
  • Number of attempts: 7
Stairs Indenting - 473 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 14
  • Position: #138 / 197
  • Number of attempts: 1
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 12
  • Position: #412 / 445
  • Number of attempts: 1
Vertical Limit - 2538 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 23
  • Position: #256 / 754
  • Number of attempts: 4
Make the circuit grid! - 101 entries

Copy this command for a circuit layout program to create 10 total smd commands. Increment the number in quotes to name each pad, and add 0.7 to each of the (X Y) coordinates at the end of each line.

  • Best score: 26
  • Best player score: 26
  • Position: #29 / 50
  • Number of attempts: 4
Simple text editing with Vim - 12693 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1953 / 3668
  • Number of attempts: 1
Divvy C.
Twitter2:

Only use Twitter for updates

entered into 36 challenges

contributed 0 challenges