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

Quicksort - 1559 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: 6
  • Position: #32 / 344
  • Number of attempts: 4
EDN reformat - 1055 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #33 / 147
  • Number of attempts: 10
Tic-Tac-Toe Grid Transformation - 326 entries

Your mission is to efficiently convert the original Tic-Tac-Toe grid, represented by 'x's and 'o's, into a neat and well-organized game board.

  • Best score: 56
  • Best player score: 58
  • Position: #6 / 79
  • Number of attempts: 8
Pick and sort servers from mirror list - 349 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: 29
  • Position: #11 / 76
  • Number of attempts: 11
Populate 3D bone names list - 457 entries

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

  • Best score: 21
  • Best player score: 21
  • Position: #18 / 121
  • Number of attempts: 8
Remove line numbers - 550 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 12
  • Best player score: 12
  • Position: #31 / 147
  • Number of attempts: 4
Find fix point of cos - 1138 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: 14
  • Position: #48 / 341
  • Number of attempts: 3
Insert column data on Confluence-style table - 425 entries

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

  • Best score: 33
  • Best player score: 34
  • Position: #20 / 99
  • Number of attempts: 9
Surround the 'z' character with brackets, quotes, and print as formatted string. - 486 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #156 / 272
  • Number of attempts: 1
Easier Align - 350 entries

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 62
  • Position: #14 / 91
  • Number of attempts: 11
Paste a column after a column - 2262 entries

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

  • Best score: 14
  • Best player score: 14
  • Position: #76 / 491
  • Number of attempts: 6
Filter number combinations that don't add to 11 - 376 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: #33 / 110
  • Number of attempts: 3
Tabbed Table to Python Array - 644 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: 52
  • Position: #22 / 167
  • Number of attempts: 7
HS exam question - 1510 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 48
  • Position: #39 / 397
  • Number of attempts: 8
Reformat symbols in list - 1470 entries

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

  • Best score: 24
  • Best player score: 24
  • Position: #54 / 323
  • Number of attempts: 5
Substraction (bis) - 579 entries

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

  • Best score: 21
  • Best player score: 22
  • Position: #18 / 108
  • Number of attempts: 19
Plotting some variables in python - 1567 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: 34
  • Position: #7 / 334
  • Number of attempts: 10
Create a diamond comment - 314 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 28
  • Position: #18 / 72
  • Number of attempts: 9
Lowercase first characters - 467 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: 34
  • Position: #37 / 175
  • Number of attempts: 6
Migrated to Postgres! - 312 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

  • Best score: 26
  • Best player score: 30
  • Position: #76 / 122
  • Number of attempts: 2
Increment number for every 10 lines - 219 entries

The file consists of 2 columns (code and percentage). We need to add 2 more columns with increasing number for 4th column (Xcols) and increment 3rd column (Ycols) only for every 10 lines with reset of 4th column

  • Best score: 25
  • Best player score: 28
  • Position: #19 / 61
  • Number of attempts: 6
simple replacements - 1662 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 20
  • Position: #110 / 371
  • Number of attempts: 9
Inverting Lines - 1837 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #90 / 498
  • Number of attempts: 3
CSV to MD format - 388 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 40
  • Position: #22 / 91
  • Number of attempts: 6
Generate a very basic Python constructor - 309 entries

I actually needed to do this myself, so I look forward to learning how.

  • Best score: 38
  • Best player score: 38
  • Position: #13 / 95
  • Number of attempts: 8
Python dataclasses - 1105 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 19
  • Position: #30 / 278
  • Number of attempts: 3
Count to 100 in word form - 107 entries

Write all the numbers from 1 to 100, using their word forms rather than the digit form. Most of the parts you will need are included in the input file. Use hyphens when appropriate.

  • Best score: 53
  • Best player score: 62
  • Position: #7 / 26
  • Number of attempts: 7
RUST Cargo.toml version to last - 320 entries

RUST Cargo.toml version to last. rusty practice on vimgolf

  • Best score: 16
  • Best player score: 17
  • Position: #43 / 95
  • Number of attempts: 7
Making 3 line function a one liner. - 306 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #42 / 195
  • Number of attempts: 1
Modernise code - 1334 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #37 / 308
  • Number of attempts: 7
Staircase - 137 entries

Going downstairs, while singing the alphabet song. Some vb practice to us all. Would it be much easier to make it go from left to right instead?

  • Best score: 21
  • Best player score: 32
  • Position: #13 / 31
  • Number of attempts: 1
Enumerate Bullets - 292 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: #17 / 80
  • Number of attempts: 5
Put a cross in the square - 203 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 20
  • Position: #2 / 84
  • Number of attempts: 5
swap number pairs - 2011 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 16
  • Position: #32 / 370
  • Number of attempts: 12
HS Final exam vimgolf - 864 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 22
  • Position: #66 / 227
  • Number of attempts: 14
Extend shell script - 103 entries

Just add some more stuff

  • Best score: 37
  • Best player score: 39
  • Position: #14 / 42
  • Number of attempts: 3
Easy modification of ssh config - 335 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 24
  • Position: #18 / 104
  • Number of attempts: 6
悟史
Twitter:

entered into 37 challenges

contributed 0 challenges