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

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: 29
  • Position: #7 / 260
  • Number of attempts: 7
Fix the shell script! - 2428 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 31
  • Position: #244 / 566
  • Number of attempts: 4
Visual block training - 1047 entries

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

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

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

  • Best score: 10
  • Best player score: 11
  • Position: #107 / 550
  • Number of attempts: 4
simple replacements - 1710 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 19
  • Position: #57 / 378
  • Number of attempts: 9
Mr. Hacker - 83 entries

Elvin is hacker. He has piece of users database from some social net site. Recently he installed Vim, and he wants to convert CSV DB to specific format `key=value' where `key' is login and `value' is password, but password in DB is encrypted in ROT13. Help him.

  • Best score: 19
  • Best player score: 20
  • Position: #22 / 34
  • Number of attempts: 4
Rural Post - 4425 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 9
  • Position: #179 / 1085
  • Number of attempts: 6
Add quotes to ansible playbook - 946 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 9
  • Position: #188 / 302
  • Number of attempts: 4
Data reformat - 286 entries

Reformat this copy-paste data! #csv

  • Best score: 36
  • Best player score: 55
  • Position: #42 / 63
  • Number of attempts: 4
Replace pattern with 1, 2, 3, ... on each line - 1114 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 21
  • Position: #41 / 228
  • Number of attempts: 18
Simple, Practical, and Common - 33483 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 22
  • Position: #2354 / 7384
  • Number of attempts: 7
Hogwarts Email Sorting - 891 entries

Given a list of emails, get the students full name and their associated house.

  • Best score: 20
  • Best player score: 20
  • Position: #51 / 257
  • Number of attempts: 3
Get mail address from outlook format - 642 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 15
  • Position: #73 / 202
  • Number of attempts: 5
prepend * to every non-blank line - 6254 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 10
  • Position: #420 / 1530
  • Number of attempts: 8
One number per line - 18673 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #746 / 3852
  • Number of attempts: 8
Right Align Part of the line - 133 entries

The challenge is to right align a part of the line - this is useful in some SQL queries where it's more clear which are the fields displayed

  • Best score: 19
  • Best player score: 20
  • Position: #18 / 42
  • Number of attempts: 7
Quote modules - 1066 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 23
  • Position: #96 / 278
  • Number of attempts: 8
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: 37
  • Position: #51 / 154
  • Number of attempts: 13
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: 9
  • Position: #94 / 226
  • Number of attempts: 3
Applying same text modification in several lines - 2851 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 12
  • Position: #13 / 843
  • Number of attempts: 5
Add string initializers to an enum - 866 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 21
  • Position: #65 / 256
  • Number of attempts: 3
Add semicolons - 10831 entries

Simply add a semicolon at the end of each line

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

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

  • Best score: 18
  • Best player score: 19
  • Position: #214 / 518
  • Number of attempts: 12
Com(m)a Trouble - 3709 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 12
  • Position: #150 / 838
  • Number of attempts: 11
Extract wireshark capture filter - 203 entries

Extract wireshark capture filter from IP plan

  • Best score: 25
  • Best player score: 25
  • Position: #7 / 69
  • Number of attempts: 6
Box it - 7849 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #443 / 1870
  • Number of attempts: 6
Tables, Functions, Sprocs - 129 entries

In order to load some scripts into my database in the correct order I need to load tables first (t_), then functions (fn_), then stored procedures (sp_). The order of the t_ lines and the order of the sp_ lines should also match. Reorder the lines so they will load correctly.

  • Best score: 10
  • Best player score: 10
  • Position: #18 / 46
  • Number of attempts: 4
Two pairs of cluster of letters creates word - 747 entries

Clean and group.

  • Best score: 17
  • Best player score: 17
  • Position: #56 / 177
  • Number of attempts: 4
Convert Application Output to CSV - 195 entries

Change the application output to comma-separated values

  • Best score: 17
  • Best player score: 19
  • Position: #44 / 55
  • Number of attempts: 7
ninja substitution - 1399 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 14
  • Position: #78 / 265
  • Number of attempts: 10
One to Ten - 2174 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 12
  • Position: #343 / 664
  • Number of attempts: 10
Join 'em - 251 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 4
  • Position: #11 / 151
  • Number of attempts: 1
change parenthesis - 287 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Position: #84 / 160
  • Number of attempts: 3
Label grid cells (6x6) - 51 entries

Label the cells of a grid with its coordinates. Rows are labelled top to bottom from A to F, and columns left to right from A to F. Each cell has a coordinate MN, where M is the row letter and N is the column letter.

  • Best score: 31
  • Best player score: 33
  • Position: #10 / 19
  • Number of attempts: 4
Remove quotes after first field - 367 entries

Remove the quotes around each field except for the first field.

  • Best score: 16
  • Best player score: 16
  • Position: #29 / 90
  • Number of attempts: 4
Reorder the groups - 1146 entries

Change the order so that the groups of fruit come before the vegetables.

  • Best score: 14
  • Best player score: 14
  • Position: #89 / 262
  • Number of attempts: 7
move titles next to url, in quotes - 510 entries

had trouble with something similar

  • Best score: 19
  • Best player score: 21
  • Position: #64 / 137
  • Number of attempts: 6
dorianm
Twitter:

entered into 37 challenges

contributed 0 challenges