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

Change class fields from camel case to snake case - 448 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #19 / 108
  • Number of attempts: 15
Search different SQL column with similar where clause - 258 entries

Replace a column in the where clause and convert all numbers from text to numeric, by replacing the leading 0 with the code 359.

  • Best score: 22
  • Best player score: 33
  • Position: #51 / 59
  • Number of attempts: 3
Remove adjacent duplicates - 559 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 19
  • Position: #6 / 146
  • Number of attempts: 11
Rearrange array to single level - 1495 entries

The goal is to flatten the array into a single list and remove any empty elements.

  • Best score: 14
  • Best player score: 14
  • Position: #14 / 247
  • Number of attempts: 13
Rearrange array to one line - 707 entries

Rearrange the array content on only one line, and remove trailing commas

  • Best score: 13
  • Best player score: 13
  • Position: #8 / 170
  • Number of attempts: 7
Copy punctuation - 570 entries

I want to copy the last line’s brackets, quotes, and commas to each line. How?

  • Best score: 19
  • Best player score: 19
  • Position: #7 / 144
  • Number of attempts: 12
Change LaTex itemizations formats - 110 entries

Inspired by the way my professor formats their LaTeX assignments.

  • Best score: 43
  • Best player score: 45
  • Position: #6 / 18
  • Number of attempts: 3
Paste a column after a column - 2604 entries

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

  • Best score: 14
  • Best player score: 14
  • Position: #11 / 565
  • Number of attempts: 5
Filter number combinations that don't add to 11 - 414 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: #6 / 118
  • Number of attempts: 7
Tabbed Table to Python Array - 743 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: #24 / 180
  • Number of attempts: 10
HS exam question - 1596 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 47
  • Position: #7 / 418
  • Number of attempts: 19
Reformat symbols in list - 1633 entries

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

  • Best score: 24
  • Best player score: 24
  • Position: #18 / 351
  • Number of attempts: 7
Fizzbuzz - 586 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 44
  • Best player score: 47
  • Position: #14 / 169
  • Number of attempts: 9
Substraction (bis) - 619 entries

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

  • Best score: 21
  • Best player score: 233
  • Position: #111 / 114
  • Number of attempts: 2
Changing around text with citations - 340 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 28
  • Position: #12 / 94
  • Number of attempts: 9
Many duplicates - 1459 entries

Quick and easy

  • Best score: 7
  • Best player score: 7
  • Position: #9 / 476
  • Number of attempts: 5
2 quick changes and a numbered list - 648 entries

The ascii will not be lost, but rather numbered in 4 digit blocks with leading zeros.

  • Best score: 37
  • Best player score: 37
  • Position: #16 / 155
  • Number of attempts: 14
delete swap - 1801 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #86 / 561
  • Number of attempts: 7
Generate a very basic Python constructor (fixed) - 1264 entries

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

  • Best score: 29
  • Best player score: 37
  • Position: #94 / 272
  • Number of attempts: 17
Fix the shell script! - 2605 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 26
  • Position: #35 / 606
  • Number of attempts: 15
Visual block training - 1089 entries

You see the input. You see the output. Go.

  • Best score: 17
  • Best player score: 156
  • Position: #200 / 206
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1664 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 12
  • Position: #235 / 559
  • Number of attempts: 12
Wikitext headings to markdown - 1003 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #28 / 210
  • Number of attempts: 19
hello-world-vimgolf - 2505 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #219 / 712
  • Number of attempts: 5
Contribute to keyboard mashing - 898 entries

Speak in tongues

  • Best score: 17
  • Best player score: 18
  • Position: #98 / 272
  • Number of attempts: 5
Fill in the chess board - 959 entries

Fill in the name of each square using its file (a-h) and rank (1-8).

  • Best score: 19
  • Best player score: 19
  • Position: #23 / 185
  • Number of attempts: 29
Learn to ask for :help - 587 entries

Learn to use the help to reduce your strokes...

  • Best score: 19
  • Best player score: 34
  • Position: #84 / 130
  • Number of attempts: 7
Plotting some variables in python - 1671 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: #46 / 349
  • Number of attempts: 8
Transpose a python matrix - 873 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 45
  • Position: #75 / 138
  • Number of attempts: 5
Increment number for every 10 lines - 231 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: 112
  • Position: #63 / 65
  • Number of attempts: 3
Python dataclasses - 1214 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 19
  • Position: #48 / 300
  • Number of attempts: 13
Making 3 line function a one liner. - 340 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #107 / 209
  • Number of attempts: 2
Modernise code - 1409 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 42
  • Position: #149 / 325
  • Number of attempts: 18
Staircase - 149 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: 21
  • Position: #2 / 34
  • Number of attempts: 17
swap number pairs - 2125 entries

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

  • Best score: 16
  • Best player score: 16
  • Position: #45 / 386
  • Number of attempts: 12
Wrap the text of an email message to 79 characters - 814 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #283 / 426
  • Number of attempts: 8
Simple Maths - 57 entries

Not much to say, discover by yourself!

  • Best score: 26
  • Best player score: 28
  • Position: #5 / 27
  • Number of attempts: 9
-a-b-c- - 3216 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Position: #311 / 1138
  • Number of attempts: 6
Ruby 1.9 hashes - 1258 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: 12
  • Best player score: 12
  • Position: #108 / 409
  • Number of attempts: 4
A Simple One - 1064 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: #560 / 670
  • Number of attempts: 1
Round Round - 321 entries

Round Round

  • Best score: 19
  • Best player score: 19
  • Position: #8 / 88
  • Number of attempts: 39
82 bottles of beer on the wall - 313 entries

Take them down. (sorry, only 82 bottles because the problem size is limited!)

  • Best score: 106
  • Best player score: 124
  • Position: #55 / 146
  • Number of attempts: 3
Reverse Simple Deletion - 857 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Position: #57 / 461
  • Number of attempts: 7
Indentation - 552 entries

Indent each line according to the right number of spaces it needs.

  • Best score: 20
  • Best player score: 21
  • Position: #12 / 181
  • Number of attempts: 19
Hatsuyume - 548 entries

http://en.wikipedia.org/wiki/Hatsuyume

  • Best score: 15
  • Best player score: 16
  • Position: #13 / 189
  • Number of attempts: 8
Context Insensitive completion 1 - 512 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 40
  • Position: #241 / 248
  • Number of attempts: 3
Change the content of a string - 1646 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #210 / 607
  • Number of attempts: 3
Flodder-challenge - 1369 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 38
  • Position: #232 / 352
  • Number of attempts: 2
Simple text editing with Vim - 13092 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1962 / 3765
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 7228 entries

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

  • Best score: 10
  • Best player score: 53
  • Position: #1503 / 1777
  • Number of attempts: 3
Alex Lewin
Twitter:

Full Stack dev, #bitcoin Lightning @atlbitlab @fedibtc

entered into 50 challenges

contributed 0 challenges