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

Transpose a python matrix - 848 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 47
  • Position: #77 / 135
  • Number of attempts: 3
Create a diamond comment - 336 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 35
  • Position: #41 / 74
  • Number of attempts: 2
Make list of numbers from 1 to 30 more compact, but more confusing - 96 entries

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

  • Best score: 74
  • Best player score: 106
  • Position: #19 / 38
  • Number of attempts: 1
Increment number for every 10 lines - 229 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: 82
  • Position: #58 / 63
  • Number of attempts: 2
simple replacements - 1710 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 20
  • Position: #108 / 378
  • Number of attempts: 7
Inverting Lines - 1870 entries

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

  • Best score: 10
  • Best player score: 12
  • Position: #282 / 505
  • Number of attempts: 6
CSV to MD format - 404 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 113
  • Position: #81 / 93
  • Number of attempts: 2
Generate a very basic Python constructor - 315 entries

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

  • Best score: 38
  • Best player score: 49
  • Position: #45 / 97
  • Number of attempts: 3
Python dataclasses - 1121 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 21
  • Position: #119 / 281
  • Number of attempts: 1
RUST HTML to maud. - 19 entries

RUST HTML to maud. maud is one of the template engines for server-side rendering based on rust. rusty practice on vimgolf

  • Best score: 135
  • Best player score: 313
  • Position: #10 / 11
  • Number of attempts: 2
RUST Cargo.toml version to last - 332 entries

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

  • Best score: 16
  • Best player score: 20
  • Position: #66 / 99
  • Number of attempts: 2
Enumerate Bullets - 309 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: #15 / 83
  • Number of attempts: 5
Put a cross in the square - 210 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #53 / 87
  • Number of attempts: 1
swap number pairs - 2023 entries

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

  • Best score: 16
  • Best player score: 18
  • Position: #126 / 373
  • Number of attempts: 10
HS Final exam vimgolf - 892 entries

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

  • Best score: 21
  • Best player score: 31
  • Position: #147 / 234
  • Number of attempts: 1
Extend shell script - 110 entries

Just add some more stuff

  • Best score: 37
  • Best player score: 46
  • Position: #20 / 44
  • Number of attempts: 2
ssh config skills - 250 entries

Parse output from `kuebctl get no -o wide` into an .ssh/config file!

  • Best score: 41
  • Best player score: 69
  • Position: #44 / 64
  • Number of attempts: 2
Change double quotes to single quotes, but with a twist - 291 entries

Although this challenge is in the context of a Python function, you don't need to know Python to do this challenge. It is to add contexts and interesting constraints. The file contains a function that prints a multi-line string literal. I wrote the string literal with double quotes, but then I decided to use single quotes instead, and that's your challenge. However, interestingly enough, the string itself contains single and double quotes. This means, inside the string literal, the originally escaped double quotes no longer need to be escaped, but the single quotes now need to be escaped. Note that the triple double quotes in the docstring should be left alone.

  • Best score: 22
  • Best player score: 37
  • Position: #38 / 55
  • Number of attempts: 2
Python: Def to Lambda - 441 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #38 / 154
  • Number of attempts: 3
Format the CSS - 137 entries

You just copied some CSS color names from the web and need to add them to your python module. Create the COLORS variable and assign a dict() with the names as keys and hex-colors as values. BEWARE OF THE TABS!!

  • Best score: 41
  • Best player score: 57
  • Position: #40 / 46
  • Number of attempts: 1
Rural Post - 4427 entries

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

  • Best score: 9
  • Best player score: 21
  • Position: #859 / 1086
  • Number of attempts: 1
Data reformat - 286 entries

Reformat this copy-paste data! #csv

  • Best score: 36
  • Best player score: 43
  • Position: #30 / 63
  • Number of attempts: 3
xrandr outputs and dashes - 671 entries

uh oh, different video drivers identify display outputs with more dashes. Quick, need to change this xrandr script!

  • Best score: 12
  • Best player score: 12
  • Position: #113 / 218
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 757 entries

ThunderLinks are durable hyperlinks to specific email messages generated from Thunderbird in HTML format. Leverage the power of vim to make them suitable for a markdown-formatted file.

  • Best score: 18
  • Best player score: 22
  • Position: #107 / 168
  • Number of attempts: 3
Capitalize the Names - 382 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: 35
  • Position: #77 / 95
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1114 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: 26
  • Position: #97 / 228
  • Number of attempts: 5
Hogwarts Email Sorting - 891 entries

Given a list of emails, get the students full name and their associated house.

  • Best score: 20
  • Best player score: 22
  • Position: #169 / 257
  • Number of attempts: 3
Get mail address from outlook format - 642 entries

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

  • Best score: 15
  • Best player score: 16
  • Position: #119 / 202
  • Number of attempts: 1
Add text at some column - 162 entries

Complete golang struct statement.

  • Best score: 31
  • Best player score: 34
  • Position: #52 / 63
  • Number of attempts: 2
prepend * to every non-blank line - 6254 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 12
  • Position: #801 / 1530
  • Number of attempts: 3
Right Align Part of the line - 133 entries

The challenge is to right align a part of the line - this is useful in some SQL queries where it's more clear which are the fields displayed

  • Best score: 19
  • Best player score: 34
  • Position: #40 / 42
  • Number of attempts: 1
Quote modules - 1066 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 25
  • Position: #130 / 278
  • Number of attempts: 1
add line and index - 100 entries

a missed line and index names need to be added

  • Best score: 44
  • Best player score: 61
  • Position: #24 / 29
  • Number of attempts: 2
Aliases for cd - 877 entries

Create these beautiful aliases with as few strokes as possible. Are you up for the challenge?

  • Best score: 30
  • Best player score: 48
  • Position: #96 / 154
  • Number of attempts: 2
Refactor typescript arrow function type - 307 entries

Make arrow function type less verbose and easier to read

  • Best score: 20
  • Best player score: 28
  • Position: #52 / 70
  • Number of attempts: 1
SCREAMING_SNAKE_CASE to Title Case - 1203 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: 29
  • Position: #170 / 247
  • Number of attempts: 1
Triangle of arrows - 181 entries

I made this by accident when working on another challenge. How would you go about making this?

  • Best score: 14
  • Best player score: 32
  • Position: #36 / 43
  • Number of attempts: 1
Alphabet soup - 425 entries

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

  • Best score: 25
  • Best player score: 39
  • Position: #80 / 106
  • Number of attempts: 2
grsh
Twitter:

entered into 38 challenges

contributed 0 challenges