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

Paste a column after a column - 612 entries

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

  • Best score: 14
  • Best player score: 22
  • Position: #90 / 141
  • Number of attempts: 1
Tabbed Table to Python Array - 316 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: 51
  • Best player score: 52
  • Position: #12 / 88
  • Number of attempts: 5
HS exam question - 1028 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 61
  • Position: #90 / 278
  • Number of attempts: 4
Reformat symbols in list - 901 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #98 / 210
  • Number of attempts: 2
Many duplicates - 797 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #216 / 266
  • Number of attempts: 1
delete swap - 981 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #211 / 320
  • Number of attempts: 2
Generate a very basic Python constructor (fixed) - 901 entries

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

  • Best score: 29
  • Best player score: 44
  • Position: #110 / 202
  • Number of attempts: 1
Fix the shell script! - 1566 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 35
  • Position: #220 / 391
  • Number of attempts: 1
Visual block training - 729 entries

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

  • Best score: 17
  • Best player score: 37
  • Position: #74 / 140
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1286 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #319 / 441
  • Number of attempts: 1
Contribute to keyboard mashing - 735 entries

Speak in tongues

  • Best score: 17
  • Best player score: 20
  • Position: #170 / 227
  • Number of attempts: 1
Fill in the chess board - 722 entries

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

  • Best score: 19
  • Best player score: 38
  • Position: #91 / 153
  • Number of attempts: 1
Create a diamond comment - 266 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 40
  • Position: #38 / 62
  • Number of attempts: 1
Migrated to Postgres! - 257 entries

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

  • Best score: 26
  • Best player score: 30
  • Position: #73 / 103
  • Number of attempts: 1
simple replacements - 1209 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 25
  • Position: #205 / 272
  • Number of attempts: 1
Making 3 line function a one liner. - 221 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #129 / 146
  • Number of attempts: 1
Modernise code - 1055 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 50
  • Position: #178 / 246
  • Number of attempts: 1
Put a cross in the square - 161 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #54 / 68
  • Number of attempts: 2
swap number pairs - 1838 entries

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

  • Best score: 16
  • Best player score: 30
  • Position: #216 / 340
  • Number of attempts: 1
HS Final exam vimgolf - 803 entries

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

  • Best score: 21
  • Best player score: 24
  • Position: #100 / 214
  • Number of attempts: 3
Turn the x - 275 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 24
  • Position: #55 / 71
  • Number of attempts: 1
Multiline to Single Line - 569 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #220 / 255
  • Number of attempts: 1
xrandr outputs and dashes - 624 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: #137 / 205
  • Number of attempts: 1
Yo To Hello - 1074 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #378 / 494
  • Number of attempts: 2
Add text at some column - 147 entries

Complete golang struct statement.

  • Best score: 31
  • Best player score: 35
  • Position: #50 / 56
  • Number of attempts: 1
Aliases for cd - 820 entries

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

  • Best score: 30
  • Best player score: 42
  • Position: #60 / 147
  • Number of attempts: 1
Unsemantic linewrapping - 858 entries

[Inspired by a blog post I read: https://scott.mn/2014/02/21/semantic_linewrapping/. Text adapted.] Sometimes when editing a Markdown file, I wrap the lines semantically. Instead of inserting a newline at 70 columns (or whatever), or making paragraphs one long line, I put in newlines at a point that seems logical to me. This may seem silly, but it produces better diffs. Semantic linewrapping also makes editing snappier. I can delete, edit or insert sentences easily using linewise operations. Code-oriented text editors like Vim and [REDACTED] are really good at this kind of manipulation. Editing text that hasn't been wrapped semantically is a pain, though:

  • Best score: 9
  • Best player score: 13
  • Position: #183 / 217
  • Number of attempts: 1
Add semicolons - 10716 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1753 / 3022
  • Number of attempts: 1
Bad Copy Syntax - 1950 entries

Copy should be from right to left, but sometimes you type it wrong.

  • Best score: 18
  • Best player score: 29
  • Position: #409 / 501
  • Number of attempts: 1
Number Sort - 299 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

  • Best score: 9
  • Best player score: 9
  • Position: #134 / 159
  • Number of attempts: 1
ninja substitution - 1328 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 18
  • Position: #181 / 254
  • Number of attempts: 1
Change part of a function name in multiple occurrences - 612 entries

Change the middle part of the function name in multiple places, preferably using the next and dot commands.

  • Best score: 14
  • Best player score: 16
  • Position: #149 / 197
  • Number of attempts: 1
change parenthesis - 265 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 10
  • Position: #140 / 150
  • Number of attempts: 1
Alphabet soup - 402 entries

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

  • Best score: 25
  • Best player score: 41
  • Position: #81 / 98
  • Number of attempts: 2
switch variable - 4993 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1246 / 1722
  • Number of attempts: 1
RosaTryp
Twitter:

She/Her Wer mi radikalisiert het? Gott, F├╝rst und Vaterland!

entered into 35 challenges

contributed 0 challenges