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

Changing date formats - 249 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 45
  • Position: #11 / 84
  • Number of attempts: 12
YAML to dotenv - 464 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 16
  • Position: #15 / 116
  • Number of attempts: 6
Change to ascending order - 247 entries

Change each line of numbers consistently from descending to ascending order.

  • Best score: 17
  • Best player score: 39
  • Position: #23 / 66
  • Number of attempts: 3
Generate an entry for each month - 165 entries

The input file contains a URI with a month in it. Generate the URIs for all the other months up to a couple of years

  • Best score: 27
  • Best player score: 145
  • Position: #46 / 49
  • Number of attempts: 1
The Fibonacci Spacer - 85 entries

Split the words, remove punctuation and add spaces before each line following the Fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89)

  • Best score: 25
  • Best player score: 43
  • Position: #12 / 29
  • Number of attempts: 3
Change class fields from camel case to snake case - 359 entries

This is the reverse of the previous challenge: https://www.vimgolf.com/challenges/9v006705493c000000000513

  • Best score: 18
  • Best player score: 18
  • Position: #24 / 90
  • Number of attempts: 4
Change class fields from snake case to camel case - 183 entries

Change the class fields in this Scala class from snake case to camel case

  • Best score: 13
  • Best player score: 13
  • Position: #35 / 71
  • Number of attempts: 3
Reorganize Pokémon - 462 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 21
  • Position: #74 / 126
  • Number of attempts: 3
extract struct tag in go - 56 entries

Can you extract all struct tags in the fewest keystrokes possible?

  • Best score: 29
  • Best player score: 33
  • Position: #7 / 22
  • Number of attempts: 7
CaN yOuR ViM dO ThAt? #1 - 145 entries

Tsoding's famous "Can your Vim do that?" https://youtu.be/Bafo3hhheHU?si=DfcT4sUEMTSAevnx&t=1091

  • Best score: 41
  • Best player score: 45
  • Position: #24 / 58
  • Number of attempts: 2
Append leading hyphen count to each line - 55 entries

Append the number of leading hyphens to the end of each line.

  • Best score: 23
  • Best player score: 25
  • Position: #11 / 17
  • Number of attempts: 3
Move list of uuids into a SQL query - 89 entries

Take the list of UUIDs and use them as a filter in the where statement of a SQL query

  • Best score: 57
  • Best player score: 63
  • Position: #12 / 38
  • Number of attempts: 4
Markdown Blog Editing - 298 entries

Convert the given link text in start file to a markdown link list.

  • Best score: 30
  • Best player score: 41
  • Position: #27 / 70
  • Number of attempts: 5
Insert column data on Confluence-style table - 458 entries

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

  • Best score: 33
  • Best player score: 41
  • Position: #38 / 109
  • Number of attempts: 7
Surround the 'z' character with brackets, quotes, and print as formatted string. - 561 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #237 / 314
  • Number of attempts: 1
Paste a column after a column - 2555 entries

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

  • Best score: 14
  • Best player score: 16
  • Position: #122 / 557
  • Number of attempts: 8
Tabbed Table to Python Array - 735 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: 55
  • Position: #50 / 179
  • Number of attempts: 10
Reformat symbols in list - 1625 entries

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

  • Best score: 24
  • Best player score: 26
  • Position: #108 / 349
  • Number of attempts: 8
Changing around text with citations - 329 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 39
  • Position: #49 / 93
  • 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: 59
  • Position: #109 / 154
  • Number of attempts: 1
Fix the shell script! - 2596 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 27
  • Position: #99 / 603
  • Number of attempts: 10
Java to JavaScript - 269 entries

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 138
  • Position: #66 / 74
  • Number of attempts: 1
Wikitext headings to markdown - 987 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 32
  • Position: #147 / 209
  • Number of attempts: 2
Lowercase first characters - 487 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: #30 / 183
  • Number of attempts: 8
Migrated to Postgres! - 331 entries

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

  • Best score: 26
  • Best player score: 30
  • Position: #84 / 131
  • Number of attempts: 1
Generate a very basic Python constructor - 316 entries

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

  • Best score: 38
  • Best player score: 40
  • Position: #28 / 98
  • Number of attempts: 1
Python dataclasses - 1187 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 30
  • Position: #198 / 294
  • Number of attempts: 5
Modernise code - 1402 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 35
  • Position: #96 / 324
  • Number of attempts: 5
Easy modification of ssh config - 382 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 33
  • Position: #80 / 115
  • Number of attempts: 4
ssh config skills - 258 entries

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

  • Best score: 41
  • Best player score: 48
  • Position: #28 / 66
  • Number of attempts: 4
Python: Def to Lambda - 455 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #83 / 156
  • Number of attempts: 2
Satisfy the go linter - 2437 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: 23
  • Position: #231 / 481
  • Number of attempts: 2
Add quotes to ansible playbook - 1001 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 10
  • Position: #252 / 316
  • Number of attempts: 3
Data reformat - 294 entries

Reformat this copy-paste data! #csv

  • Best score: 36
  • Best player score: 51
  • Position: #38 / 65
  • Number of attempts: 10
xrandr outputs and dashes - 716 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: 15
  • Position: #186 / 224
  • Number of attempts: 3
From a Thunderlink to a Markdown link - 776 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: 21
  • Position: #101 / 172
  • Number of attempts: 5
Yo To Hello - 1137 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 10
  • Position: #376 / 528
  • Number of attempts: 1
C# function to F# - 30 entries

Converting from C# to F# is not hard, but requires some manual labor. Here you should convert a C# function using a C# class to a F# function using a C# class.

  • Best score: 101
  • Best player score: 110
  • Position: #5 / 11
  • Number of attempts: 9
Get mail address from outlook format - 649 entries

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

  • Best score: 15
  • Best player score: 16
  • Position: #125 / 204
  • Number of attempts: 5
Add string initializers to an enum - 873 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 23
  • Position: #121 / 259
  • Number of attempts: 5
remove lines containing the word "reader" - 3604 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #851 / 1169
  • Number of attempts: 3
Com(m)a Trouble - 3875 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 23
  • Position: #688 / 876
  • Number of attempts: 2
Extract wireshark capture filter - 216 entries

Extract wireshark capture filter from IP plan

  • Best score: 25
  • Best player score: 27
  • Position: #39 / 72
  • Number of attempts: 2
html paragraph to table - 606 entries

reformat html paragraph to table

  • Best score: 48
  • Best player score: 58
  • Position: #68 / 126
  • Number of attempts: 4
Preferably without multi-cursor plugin - 540 entries

Originally asked as question on reddit by kpthunder: https://www.reddit.com/r/vim/comments/9fvsro/what_is_the_most_efficient_way_to_go_about/

  • Best score: 30
  • Best player score: 34
  • Position: #59 / 129
  • Number of attempts: 3
Basic renumbering - 5683 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 23
  • Position: #1081 / 1269
  • Number of attempts: 4
Change attribute to getter - 140 entries

Wrap attributes with a getter method.

  • Best score: 24
  • Best player score: 24
  • Position: #30 / 59
  • 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: 33
  • Position: #16 / 46
  • Number of attempts: 2
Greek Letters - 68 entries

Starting with a list of Greek letters, create a cross-reference table showing all of the Greek alpha-beta. You'll likely need to use digraphs (:help digraphs). Note that while most digraphs can be entered with either character first, lowercase sigma has two digraphs -- s* AND *s! Good luck!

  • Best score: 34
  • Best player score: 81
  • Position: #14 / 26
  • Number of attempts: 4
change parenthesis - 296 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 10
  • Position: #146 / 161
  • Number of attempts: 3
move titles next to url, in quotes - 537 entries

had trouble with something similar

  • Best score: 19
  • Best player score: 24
  • Position: #119 / 142
  • Number of attempts: 1
convert yml into java pojo field - 857 entries

How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file

  • Best score: 29
  • Best player score: 31
  • Position: #148 / 227
  • Number of attempts: 2
Swap assigned value - 655 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 12
  • Position: #215 / 256
  • Number of attempts: 4
Cartesian product - 259 entries

{1,2,3,4,5} X {1,2,3,4,5}

  • Best score: 24
  • Best player score: 52
  • Position: #87 / 97
  • Number of attempts: 2
Collect List - 4305 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 13
  • Position: #626 / 1191
  • Number of attempts: 4
Condensed Cases - 804 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 14
  • Position: #148 / 247
  • Number of attempts: 2
-a-b-c- - 3216 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Position: #877 / 1138
  • Number of attempts: 2
Piphilology - 146 entries

Piphilology comprises the creation and use of mnemonic techniques to remember a span of digits of the mathematical constant π. http://en.wikipedia.org/wiki/Piphilology

  • Best score: 28
  • Best player score: 42
  • Position: #49 / 53
  • Number of attempts: 2
REDRUM - 171 entries

If you remember "The Shinning", the first time you saw the bloody word REDRUM you probably thinked "What the Hell is that?" Well, then you know that you need a little help from a looking-glass to make sense of it. Now it's time to use vim like a mirror to reveal the message.

  • Best score: 14
  • Best player score: 29
  • Position: #59 / 66
  • Number of attempts: 5
Harder than "abcd > a b c d" - 104 entries

Not as easy as the last challenge. This time, just one space between a and b, up to 25 spaces between y and z. (Removed some lines; diff was too long.)

  • Best score: 15
  • Best player score: 30
  • Position: #42 / 46
  • Number of attempts: 4
Groups magic - 161 entries

Regexp or macros for string converting: (a) -> ___ (abc) -> ____ (abcd) -> ______ All in the '(' replace to _ multiply by char count + ()

  • Best score: 13
  • Best player score: 14
  • Position: #72 / 94
  • Number of attempts: 3
abcd > a b c d - 297 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #206 / 226
  • Number of attempts: 1
Readable Rubyhash - 267 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 23
  • Best player score: 35
  • Position: #81 / 95
  • Number of attempts: 2
A simple change - 468 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #134 / 193
  • Number of attempts: 2
SFD-ROC: The Quick Brown Fox - 200 entries

Someone has vandalized our text (again). Please fix to read: The Quick Brown Fox Jumps Over The Lazy Dog.

  • Best score: 24
  • Best player score: 25
  • Position: #20 / 107
  • Number of attempts: 7
The Quick Brown Fox Jumps Over The Lazy Vim - 425 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 11
  • Position: #161 / 193
  • Number of attempts: 5
The name of the game - 668 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #284 / 361
  • Number of attempts: 3
lamb had a little Mary - 618 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 35
  • Position: #91 / 169
  • Number of attempts: 9
Chucking wood - 135 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: #19 / 50
  • Number of attempts: 6
Vertical Limit - 2552 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #397 / 757
  • Number of attempts: 2
Switch function arguments - 2140 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #429 / 664
  • Number of attempts: 3
The Cake is a Lie - 1361 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 16
  • Position: #515 / 531
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 7154 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 28
  • Best player score: 34
  • Position: #326 / 1754
  • Number of attempts: 11
0xf00ff00f
Twitter:

old guy | mid software engineer | interests: programming, pull-ups, running, science fiction, city pop, 日本語(まだまだ初心者ですけど)

entered into 73 challenges

contributed 0 challenges