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

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

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

  • Best score: 17
  • Best player score: 17
  • Position: #25 / 272
  • Number of attempts: 1
Paste a column after a column - 2262 entries

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

  • Best score: 14
  • Best player score: 22
  • Position: #295 / 491
  • Number of attempts: 1
Tabbed Table to Python Array - 644 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: #21 / 167
  • Number of attempts: 5
HS exam question - 1510 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 61
  • Position: #125 / 397
  • Number of attempts: 4
Reformat symbols in list - 1470 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #143 / 323
  • Number of attempts: 2
Many duplicates - 1254 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #318 / 413
  • Number of attempts: 1
delete swap - 1534 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #211 / 482
  • Number of attempts: 2
Generate a very basic Python constructor (fixed) - 1184 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: #136 / 249
  • Number of attempts: 1
Fix the shell script! - 2344 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 35
  • Position: #313 / 542
  • Number of attempts: 1
Visual block training - 1005 entries

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #371 / 525
  • Number of attempts: 1
Contribute to keyboard mashing - 841 entries

Speak in tongues

  • Best score: 17
  • Best player score: 20
  • Position: #192 / 257
  • Number of attempts: 1
Fill in the chess board - 905 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: #103 / 175
  • Number of attempts: 1
Plotting some variables in python - 1567 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: 43
  • Position: #148 / 334
  • Number of attempts: 1
Create a diamond comment - 314 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 40
  • Position: #44 / 72
  • Number of attempts: 1
Migrated to Postgres! - 312 entries

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

  • Best score: 26
  • Best player score: 30
  • Position: #82 / 122
  • Number of attempts: 1
simple replacements - 1662 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 25
  • Position: #252 / 371
  • Number of attempts: 1
RUST Cargo.toml version to last - 320 entries

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

  • Best score: 16
  • Best player score: 18
  • Position: #61 / 95
  • Number of attempts: 1
Making 3 line function a one liner. - 306 entries

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 50
  • Position: #219 / 308
  • Number of attempts: 1
Put a cross in the square - 203 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #61 / 84
  • Number of attempts: 2
swap number pairs - 2011 entries

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

  • Best score: 16
  • Best player score: 30
  • Position: #238 / 370
  • Number of attempts: 1
HS Final exam vimgolf - 864 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: #107 / 227
  • Number of attempts: 3
Turn the x - 297 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 24
  • Position: #59 / 77
  • Number of attempts: 1
Multiline to Single Line - 668 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #220 / 292
  • Number of attempts: 1
xrandr outputs and dashes - 652 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 / 213
  • Number of attempts: 1
Yo To Hello - 1115 entries

Simply Turn Yo To Hello

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

Complete golang struct statement.

  • Best score: 31
  • Best player score: 35
  • Position: #54 / 60
  • Number of attempts: 1
Aliases for cd - 849 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: #63 / 150
  • Number of attempts: 1
Unsemantic linewrapping - 890 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: #189 / 224
  • Number of attempts: 1
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1761 / 3044
  • Number of attempts: 1
Bad Copy Syntax - 2001 entries

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

  • Best score: 18
  • Best player score: 29
  • Position: #421 / 516
  • Number of attempts: 1
Number Sort - 305 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 / 163
  • Number of attempts: 1
Add to end of each line... kinda - 325 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 12
  • Position: #105 / 171
  • Number of attempts: 1
ninja substitution - 1372 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 18
  • Position: #188 / 261
  • Number of attempts: 1
Sudoku table - 70 entries

Make this simple sudoku table look nice and legible.

  • Best score: 48
  • Best player score: 54
  • Position: #14 / 31
  • Number of attempts: 2
Change part of a function name in multiple occurrences - 639 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: #154 / 203
  • Number of attempts: 1
change parenthesis - 278 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 10
  • Position: #144 / 156
  • Number of attempts: 1
Alphabet soup - 419 entries

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

  • Best score: 25
  • Best player score: 41
  • Position: #85 / 103
  • Number of attempts: 2
switch variable - 5036 entries

how fast can you switch two variable ?

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

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

entered into 40 challenges

contributed 0 challenges