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 - 1121 entries

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

  • Best score: 14
  • Best player score: 22
  • Position: #143 / 236
  • Number of attempts: 1
Tabbed Table to Python Array - 389 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: #13 / 110
  • Number of attempts: 5
HS exam question - 1143 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 61
  • Position: #98 / 309
  • Number of attempts: 4
Reformat symbols in list - 1035 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #107 / 235
  • Number of attempts: 2
Many duplicates - 851 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #231 / 287
  • Number of attempts: 1
delete swap - 1095 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #211 / 356
  • Number of attempts: 2
Generate a very basic Python constructor (fixed) - 926 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: #112 / 208
  • Number of attempts: 1
Fix the shell script! - 1728 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 35
  • Position: #241 / 418
  • Number of attempts: 1
Visual block training - 780 entries

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #330 / 458
  • Number of attempts: 1
Contribute to keyboard mashing - 748 entries

Speak in tongues

  • Best score: 17
  • Best player score: 20
  • Position: #172 / 231
  • Number of attempts: 1
Fill in the chess board - 737 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: #92 / 155
  • Number of attempts: 1
Create a diamond comment - 271 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 40
  • Position: #39 / 66
  • Number of attempts: 1
Migrated to Postgres! - 268 entries

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

  • Best score: 26
  • Best player score: 30
  • Position: #75 / 107
  • Number of attempts: 1
simple replacements - 1264 entries

The goal is to see the replacement commands in action.

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

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 50
  • Position: #187 / 261
  • Number of attempts: 1
Put a cross in the square - 175 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #55 / 76
  • Number of attempts: 2
swap number pairs - 1871 entries

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

  • Best score: 16
  • Best player score: 30
  • Position: #221 / 346
  • Number of attempts: 1
HS Final exam vimgolf - 815 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: #101 / 215
  • 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 - 585 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #220 / 260
  • 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 - 1081 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #378 / 497
  • 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 - 861 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: #184 / 218
  • Number of attempts: 1
Add semicolons - 10720 entries

Simply add a semicolon at the end of each line

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

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

  • Best score: 18
  • Best player score: 29
  • Position: #409 / 502
  • 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 - 1336 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 18
  • Position: #182 / 255
  • 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 - 267 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 10
  • Position: #140 / 151
  • 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 - 4997 entries

how fast can you switch two variable ?

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

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

entered into 35 challenges

contributed 0 challenges