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

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: 35
  • Position: #58 / 334
  • Number of attempts: 4
Transpose a python matrix - 845 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 33
  • Position: #43 / 134
  • Number of attempts: 3
Create a diamond comment - 314 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 28
  • Position: #17 / 72
  • Number of attempts: 6
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: 33
  • Position: #6 / 175
  • Number of attempts: 1
Make list of numbers from 1 to 30 more compact, but more confusing - 90 entries

Change the naming logic of numbers to end up with less lines.

  • Best score: 74
  • Best player score: 91
  • Position: #9 / 36
  • Number of attempts: 3
Migrated to Postgres! - 312 entries

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

  • Best score: 26
  • Best player score: 29
  • Position: #44 / 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: 26
  • Position: #13 / 61
  • Number of attempts: 2
simple replacements - 1662 entries

The goal is to see the replacement commands in action.

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

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

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

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 40
  • Position: #21 / 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: #11 / 95
  • Number of attempts: 2
Python dataclasses - 1105 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 19
  • Position: #28 / 278
  • Number of attempts: 2
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: #6 / 26
  • 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: #38 / 195
  • Number of attempts: 1
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: 31
  • Position: #12 / 31
  • Number of attempts: 2
swap number pairs - 2011 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #89 / 370
  • Number of attempts: 6
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: #64 / 227
  • Number of attempts: 2
Extend shell script - 103 entries

Just add some more stuff

  • Best score: 37
  • Best player score: 39
  • Position: #13 / 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: 25
  • Position: #24 / 104
  • Number of attempts: 3
Rural Post - 4368 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 10
  • Position: #418 / 1072
  • Number of attempts: 1
Satisfy the go linter - 2329 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 21
  • Position: #184 / 457
  • Number of attempts: 1
Multiline to Single Line - 668 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #142 / 292
  • Number of attempts: 1
Capitalize the Names - 361 entries

I want to capitalize the names in quotes, but just the people's names, not the file names.

  • Best score: 21
  • Best player score: 21
  • Position: #35 / 91
  • Number of attempts: 6
Yo To Hello - 1115 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #320 / 518
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1098 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 22
  • Position: #83 / 225
  • Number of attempts: 1
Simple, Practical, and Common - 33385 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: #2345 / 7364
  • Number of attempts: 1
Get mail address from outlook format - 621 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 16
  • Position: #117 / 196
  • Number of attempts: 2
Swap values - 4543 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Position: #517 / 1257
  • Number of attempts: 4
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #733 / 3842
  • Number of attempts: 3
SCREAMING_SNAKE_CASE to Title Case - 1181 entries

Convert strings in SCREAMING_SNAKE_CASE to Title Case. Examples: EMPLOYEE_NAME -> Employee Name REVENUE_YEAR_TO_DATE -> Revenue Year To Date SALARY -> Salary

  • Best score: 19
  • Best player score: 19
  • Position: #55 / 244
  • Number of attempts: 5
Box it - 7828 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #434 / 1865
  • Number of attempts: 2
Cool or not? - 793 entries

abc trying to be cool or not...

  • Best score: 15
  • Best player score: 15
  • Position: #67 / 226
  • Number of attempts: 6
Two pairs of cluster of letters creates word - 735 entries

Clean and group.

  • Best score: 17
  • Best player score: 18
  • Position: #90 / 174
  • Number of attempts: 2
Flip the bit - 119 entries

Change the specific 0 to a 1.

  • Best score: 8
  • Best player score: 9
  • Position: #38 / 70
  • Number of attempts: 1
Build a six - 272 entries

Just enjoy building "a" floors...

  • Best score: 22
  • Best player score: 23
  • Position: #73 / 92
  • Number of attempts: 1
Increment each number - 977 entries

Increment each number individually by one

  • Best score: 15
  • Best player score: 16
  • Position: #81 / 242
  • Number of attempts: 5
Letter case trickery - 1594 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 10
  • Position: #167 / 511
  • Number of attempts: 2
Alphabet soup - 419 entries

Create a column of all alphabet characters organized in a funky way

  • Best score: 25
  • Best player score: 26
  • Position: #50 / 103
  • Number of attempts: 3
A Simple One - 1001 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #517 / 643
  • Number of attempts: 1
Almost encrypted - 198 entries

Convert the first paragraph to be even less readable.

  • Best score: 5
  • Best player score: 5
  • Position: #117 / 144
  • Number of attempts: 1
Reconstruct the Sentence - 1369 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 20
  • Best player score: 20
  • Position: #111 / 384
  • Number of attempts: 4
Simple text editing with Vim - 12290 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1867 / 3581
  • Number of attempts: 2
Georg Bökman
Twitter:

entered into 42 challenges

contributed 0 challenges