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. - 507 entries

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

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

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

  • Best score: 14
  • Best player score: 22
  • Position: #319 / 523
  • Number of attempts: 1
Tabbed Table to Python Array - 652 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: #23 / 171
  • Number of attempts: 5
HS exam question - 1523 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 61
  • Position: #126 / 404
  • Number of attempts: 4
Reformat symbols in list - 1507 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #146 / 334
  • Number of attempts: 2
Many duplicates - 1350 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #342 / 440
  • Number of attempts: 1
delete swap - 1650 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #211 / 514
  • Number of attempts: 2
Generate a very basic Python constructor (fixed) - 1231 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: #141 / 260
  • Number of attempts: 1
Fix the shell script! - 2431 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 35
  • Position: #323 / 569
  • Number of attempts: 1
Visual block training - 1047 entries

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #381 / 551
  • Number of attempts: 1
Contribute to keyboard mashing - 880 entries

Speak in tongues

  • Best score: 17
  • Best player score: 20
  • Position: #199 / 268
  • Number of attempts: 1
Fill in the chess board - 933 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: #106 / 180
  • Number of attempts: 1
Plotting some variables in python - 1605 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: #153 / 345
  • Number of attempts: 1
Create a diamond comment - 336 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 40
  • Position: #46 / 74
  • Number of attempts: 1
Migrated to Postgres! - 324 entries

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

  • Best score: 26
  • Best player score: 30
  • Position: #86 / 126
  • Number of attempts: 1
simple replacements - 1710 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 25
  • Position: #256 / 378
  • Number of attempts: 1
RUST Cargo.toml version to last - 332 entries

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

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

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 50
  • Position: #224 / 316
  • Number of attempts: 1
Put a cross in the square - 210 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #63 / 87
  • Number of attempts: 2
swap number pairs - 2023 entries

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

  • Best score: 16
  • Best player score: 30
  • Position: #239 / 373
  • Number of attempts: 1
HS Final exam vimgolf - 892 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: #111 / 234
  • Number of attempts: 3
Turn the x - 317 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 24
  • Position: #62 / 80
  • Number of attempts: 1
Multiline to Single Line - 680 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #220 / 298
  • Number of attempts: 1
xrandr outputs and dashes - 671 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 / 218
  • Number of attempts: 1
Yo To Hello - 1127 entries

Simply Turn Yo To Hello

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

Complete golang struct statement.

  • Best score: 31
  • Best player score: 35
  • Position: #56 / 63
  • Number of attempts: 1
Aliases for cd - 877 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: #65 / 154
  • Number of attempts: 1
Unsemantic linewrapping - 901 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: #191 / 226
  • Number of attempts: 1
Add semicolons - 10831 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1764 / 3055
  • Number of attempts: 1
Bad Copy Syntax - 2009 entries

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

  • Best score: 18
  • Best player score: 29
  • Position: #423 / 518
  • Number of attempts: 1
Number Sort - 307 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 / 165
  • Number of attempts: 1
Add to end of each line... kinda - 329 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 / 173
  • Number of attempts: 1
ninja substitution - 1399 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 18
  • Position: #192 / 265
  • Number of attempts: 1
Sudoku table - 73 entries

Make this simple sudoku table look nice and legible.

  • Best score: 48
  • Best player score: 54
  • Position: #15 / 33
  • Number of attempts: 2
Change part of a function name in multiple occurrences - 648 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: #156 / 205
  • Number of attempts: 1
change parenthesis - 287 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 10
  • Position: #147 / 160
  • Number of attempts: 1
Alphabet soup - 425 entries

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

  • Best score: 25
  • Best player score: 41
  • Position: #87 / 106
  • Number of attempts: 2
switch variable - 5045 entries

how fast can you switch two variable ?

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

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

entered into 40 challenges

contributed 0 challenges