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

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

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

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

  • Best score: 14
  • Best player score: 22
  • Position: #276 / 452
  • Number of attempts: 1
Tabbed Table to Python Array - 604 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: #20 / 158
  • Number of attempts: 5
HS exam question - 1419 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 61
  • Position: #121 / 381
  • Number of attempts: 4
Reformat symbols in list - 1411 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #137 / 310
  • Number of attempts: 2
Many duplicates - 1189 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #302 / 387
  • Number of attempts: 1
delete swap - 1454 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #211 / 461
  • Number of attempts: 2
Generate a very basic Python constructor (fixed) - 1155 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: #133 / 243
  • Number of attempts: 1
Fix the shell script! - 2048 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 35
  • Position: #282 / 491
  • Number of attempts: 1
Visual block training - 949 entries

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #366 / 517
  • Number of attempts: 1
Contribute to keyboard mashing - 806 entries

Speak in tongues

  • Best score: 17
  • Best player score: 20
  • Position: #184 / 247
  • Number of attempts: 1
Fill in the chess board - 886 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: #102 / 173
  • Number of attempts: 1
Plotting some variables in python - 1539 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: #146 / 327
  • Number of attempts: 1
Create a diamond comment - 301 entries

Encapsulate the text in a diamond pattern.

  • Best score: 27
  • Best player score: 40
  • Position: #43 / 70
  • Number of attempts: 1
Migrated to Postgres! - 296 entries

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

  • Best score: 26
  • Best player score: 30
  • Position: #79 / 117
  • Number of attempts: 1
simple replacements - 1505 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 25
  • Position: #239 / 329
  • 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. - 301 entries

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 50
  • Position: #215 / 303
  • Number of attempts: 1
Put a cross in the square - 201 entries

Put a cross in the square

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

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

  • Best score: 16
  • Best player score: 30
  • Position: #237 / 368
  • Number of attempts: 1
HS Final exam vimgolf - 852 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: #106 / 224
  • 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 - 595 entries

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

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

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #378 / 511
  • 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 - 888 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: #188 / 223
  • Number of attempts: 1
Add semicolons - 10780 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1760 / 3041
  • Number of attempts: 1
Bad Copy Syntax - 1992 entries

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

  • Best score: 18
  • Best player score: 29
  • Position: #418 / 512
  • Number of attempts: 1
Number Sort - 303 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 / 162
  • Number of attempts: 1
Add to end of each line... kinda - 322 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 / 169
  • Number of attempts: 1
ninja substitution - 1368 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 18
  • Position: #187 / 260
  • Number of attempts: 1
Sudoku table - 62 entries

Make this simple sudoku table look nice and legible.

  • Best score: 48
  • Best player score: 54
  • Position: #13 / 30
  • Number of attempts: 2
Change part of a function name in multiple occurrences - 637 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 / 202
  • 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 - 5026 entries

how fast can you switch two variable ?

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

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

entered into 40 challenges

contributed 0 challenges