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 - 362 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: #43 / 78
  • Number of attempts: 1
Find fix point of cos - 1158 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: #114 / 350
  • Number of attempts: 8
Surround the 'z' character with brackets, quotes, and print as formatted string. - 494 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #224 / 278
  • Number of attempts: 1
Paste a column after a column - 2310 entries

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

  • Best score: 14
  • Best player score: 18
  • Position: #231 / 500
  • Number of attempts: 4
Reformat symbols in list - 1477 entries

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

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

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 28
  • Position: #18 / 89
  • Number of attempts: 5
2 quick changes and a numbered list - 610 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: #71 / 146
  • Number of attempts: 1
delete swap - 1574 entries

delete all swap

  • Best score: 5
  • Best player score: 10
  • Position: #403 / 493
  • Number of attempts: 1
hello-world-vimgolf - 2394 entries

Simple number generation

  • Best score: 10
  • Best player score: 14
  • Position: #524 / 680
  • Number of attempts: 1
Fill in the chess board - 917 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: #66 / 178
  • Number of attempts: 4
Transpose a python matrix - 847 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 39
  • Position: #64 / 135
  • Number of attempts: 4
Lowercase first characters - 480 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: #73 / 178
  • Number of attempts: 2
simple replacements - 1678 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 24
  • Position: #216 / 374
  • Number of attempts: 3
Inverting Lines - 1850 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #339 / 501
  • Number of attempts: 3
Modernise code - 1343 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 38
  • Position: #114 / 310
  • Number of attempts: 7
Enumerate Bullets - 306 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 / 82
  • Number of attempts: 2
Easy modification of ssh config - 336 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 25
  • Position: #35 / 105
  • Number of attempts: 5
Applying same text modification in several lines - 2851 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #266 / 843
  • Number of attempts: 3
Add string initializers to an enum - 862 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 24
  • Position: #144 / 254
  • 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: 25
  • Position: #375 / 516
  • Number of attempts: 3
From argument to object - 1475 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: #263 / 451
  • Number of attempts: 3
create arrows in a list - 106 entries

Add arrow at same distance

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

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 15
  • Position: #137 / 261
  • Number of attempts: 5
Python challenge - 147 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 / 44
  • Number of attempts: 4
Assign numbers to fields - 106 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: #46 / 60
  • Number of attempts: 2
Square numbers - 99 entries

Boring math puzzle.

  • Best score: 16
  • Best player score: 25
  • Position: #20 / 40
  • Number of attempts: 4
NATO phonetic alphabet - 501 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 22
  • Position: #121 / 191
  • Number of attempts: 2
A simple change - 442 entries

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

  • Best score: 12
  • Best player score: 17
  • Position: #166 / 189
  • Number of attempts: 1
The name of the game - 650 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #278 / 356
  • Number of attempts: 1
Complete the circuit grid! - 84 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: 49
  • Best player score: 52
  • Position: #7 / 28
  • Number of attempts: 8
Chucking wood - 110 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: #16 / 47
  • Number of attempts: 7
Stairs Indenting - 448 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 14
  • Position: #136 / 193
  • Number of attempts: 1
Let's play some Ivmgolf - 1096 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 12
  • Position: #410 / 442
  • Number of attempts: 1
Vertical Limit - 2479 entries

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

  • Best score: 21
  • Best player score: 23
  • Position: #250 / 744
  • Number of attempts: 4
Make the circuit grid! - 87 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 / 48
  • Number of attempts: 4
Simple text editing with Vim - 12341 entries

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

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

Only use Twitter for updates

entered into 36 challenges

contributed 0 challenges