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

Remove adjacent duplicates - 466 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 36
  • Position: #84 / 125
  • Number of attempts: 10
Move to corresponding lines - 244 entries

Move the values to the corresponding lines.

  • Best score: 16
  • Best player score: 26
  • Position: #27 / 54
  • Number of attempts: 5
Rearrange array to single level - 1340 entries

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

  • Best score: 14
  • Best player score: 19
  • Position: #44 / 215
  • Number of attempts: 5
Rearrange array to one line - 616 entries

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

  • Best score: 13
  • Best player score: 20
  • Position: #63 / 152
  • Number of attempts: 2
Copy punctuation - 494 entries

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

  • Best score: 19
  • Best player score: 30
  • Position: #30 / 125
  • Number of attempts: 4
Change LaTex itemizations formats - 103 entries

Inspired by the way my professor formats their LaTeX assignments.

  • Best score: 43
  • Best player score: 76
  • Position: #10 / 17
  • Number of attempts: 4
Column wise pasting - 173 entries

Make a table from 3 columns

  • Best score: 17
  • Best player score: 27
  • Position: #21 / 38
  • Number of attempts: 4
Deleting text - 253 entries

Delete everything except some specific numbers.

  • Best score: 26
  • Best player score: 47
  • Position: #50 / 81
  • Number of attempts: 4
Evil Numbers - 82 entries

Print the first 100 evil numbers https://oeis.org/A001969. This is an advert for code.golf https://code.golf/evil-numbers#viml

  • Best score: 25
  • Best player score: 353
  • Position: #22 / 23
  • Number of attempts: 1
Find anomalies - 149 entries

There is one special character per line

  • Best score: 30
  • Best player score: 71
  • Position: #34 / 40
  • Number of attempts: 2
New teacher - 998 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 26
  • Position: #116 / 215
  • Number of attempts: 4
Truth Table to ModelSim - 58 entries

Convert this truth table to simulator instructions!

  • Best score: 64
  • Best player score: 117
  • Position: #12 / 17
  • Number of attempts: 2
months to html list items - 1025 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 24
  • Position: #95 / 279
  • Number of attempts: 5
Quicksort - 1968 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: 24
  • Position: #245 / 434
  • Number of attempts: 5
Populate 3D bone names list - 629 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #58 / 162
  • Number of attempts: 4
Find fix point of cos - 1403 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: 15
  • Position: #234 / 416
  • Number of attempts: 3
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: 66
  • Position: #77 / 109
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 560 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #214 / 313
  • Number of attempts: 1
Paste a column after a column - 2537 entries

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

  • Best score: 14
  • Best player score: 18
  • Position: #267 / 553
  • Number of attempts: 1
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: 66
  • Position: #130 / 179
  • Number of attempts: 2
HS exam question - 1589 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 68
  • Position: #184 / 417
  • Number of attempts: 4
Reformat symbols in list - 1621 entries

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

  • Best score: 24
  • Best player score: 39
  • Position: #267 / 348
  • Number of attempts: 1
Substraction (bis) - 603 entries

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

  • Best score: 21
  • Best player score: 116
  • Position: #103 / 113
  • Number of attempts: 1
Many duplicates - 1445 entries

Quick and easy

  • Best score: 7
  • Best player score: 9
  • Position: #339 / 468
  • Number of attempts: 2
delete swap - 1786 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #352 / 555
  • Number of attempts: 5
Fix the shell script! - 2546 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 33
  • Position: #293 / 591
  • Number of attempts: 1
Visual block training - 1075 entries

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

  • Best score: 17
  • Best player score: 46
  • Position: #134 / 205
  • Number of attempts: 3
Put a newline after every 10 lines in vim - 1660 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #409 / 558
  • Number of attempts: 1
Wikitext headings to markdown - 987 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 25
  • Position: #112 / 209
  • Number of attempts: 1
hello-world-vimgolf - 2499 entries

Simple number generation

  • Best score: 10
  • Best player score: 11
  • Position: #423 / 708
  • Number of attempts: 2
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: 112
  • Position: #172 / 185
  • Number of attempts: 1
Plotting some variables in python - 1661 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: 40
  • Position: #126 / 348
  • Number of attempts: 6
Inverting Lines - 1900 entries

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

  • Best score: 10
  • Best player score: 12
  • Position: #309 / 511
  • Number of attempts: 4
RUST Cargo.toml version to last - 355 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #72 / 100
  • Number of attempts: 5
RUST match with enum for Coin - 183 entries

RUST match with enum for Coin rusty practice on vimgolf

  • Best score: 84
  • Best player score: 107
  • Position: #29 / 53
  • Number of attempts: 2
Making 3 line function a one liner. - 328 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #177 / 205
  • Number of attempts: 1
Modernise code - 1400 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 44
  • Position: #184 / 323
  • Number of attempts: 1
Simple, Practical, and Common - 33664 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: #2400 / 7429
  • Number of attempts: 5
vim = 22 / 7 - 475 entries

pi square vim

  • Best score: 20
  • Best player score: 33
  • Position: #101 / 135
  • Number of attempts: 3
Swap values inside brackets - 2500 entries

Easy challenge.

  • Best score: 13
  • Best player score: 16
  • Position: #274 / 580
  • Number of attempts: 5
V to the i - 4813 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Position: #1498 / 1897
  • Number of attempts: 3
Add semicolons - 10876 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1779 / 3069
  • Number of attempts: 4
Two pairs of cluster of letters creates word - 749 entries

Clean and group.

  • Best score: 17
  • Best player score: 18
  • Position: #95 / 178
  • Number of attempts: 4
Copy three lines - 2875 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 18
  • Position: #358 / 641
  • Number of attempts: 1
comment and uncomment code inline - 1122 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 9
  • Position: #160 / 322
  • Number of attempts: 6
Letterbox - 145 entries

Make a box!

  • Best score: 35
  • Best player score: 75
  • Position: #24 / 28
  • Number of attempts: 1
Flip the bit - 129 entries

Change the specific 0 to a 1.

  • Best score: 8
  • Best player score: 9
  • Position: #45 / 74
  • Number of attempts: 2
Just the middle - 11473 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3200 / 4205
  • Number of attempts: 3
For all cases. - 161 entries

In this case... change it! :) Watch the line.

  • Best score: 8
  • Best player score: 8
  • Position: #92 / 106
  • Number of attempts: 3
Simple addition - 326 entries

The right side of the equation is already there. We just need the left one now.

  • Best score: 12
  • Best player score: 18
  • Position: #117 / 122
  • Number of attempts: 1
Triangle of arrows - 199 entries

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

  • Best score: 14
  • Best player score: 76
  • Position: #44 / 44
  • Number of attempts: 2
Build a six - 294 entries

Just enjoy building "a" floors...

  • Best score: 22
  • Best player score: 22
  • Position: #60 / 95
  • Number of attempts: 3
move titles next to url, in quotes - 534 entries

had trouble with something similar

  • Best score: 19
  • Best player score: 22
  • Position: #95 / 141
  • Number of attempts: 2
Fix the XML - 1039 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 25
  • Position: #179 / 290
  • Number of attempts: 2
Change name of a variable - 179 entries

Replace the name of the $variable with the fastest move possible. The challenge is having a command that allow you to easily change the variable name even if its indented.

  • Best score: 9
  • Best player score: 11
  • Position: #134 / 137
  • Number of attempts: 1
Where should I put the Newline? - 881 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #411 / 437
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10676 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2516 / 3687
  • Number of attempts: 1
Parsing with CSV: Unify lines and result. - 179 entries

col1;col2;col3;col4 A;1;4;5 A;3;4; A;1;4; # New output: col1;col2;col3;col4 A;1(2x);3;4(3x);5 any ideas?

  • Best score: 21
  • Best player score: 23
  • Position: #54 / 77
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1606 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 16
  • Position: #434 / 446
  • Number of attempts: 1
Giacomo Sansone
Github:

entered into 59 challenges

contributed 0 challenges