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

Find fix point of cos - 1408 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 14
  • Position: #14 / 418
  • Number of attempts: 8
Surround the 'z' character with brackets, quotes, and print as formatted string. - 561 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #95 / 314
  • Number of attempts: 2
delete swap - 1788 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #257 / 557
  • Number of attempts: 2
hello-world-vimgolf - 2501 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #279 / 709
  • Number of attempts: 2
simple replacements - 1793 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 27
  • Position: #313 / 389
  • Number of attempts: 1
Inverting Lines - 1907 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 10
  • Position: #194 / 512
  • Number of attempts: 6
Making 3 line function a one liner. - 329 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #1 / 206
  • Number of attempts: 3
Extend shell script - 137 entries

Just add some more stuff

  • Best score: 37
  • Best player score: 63
  • Position: #30 / 47
  • Number of attempts: 2
Rural Post - 4515 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #49 / 1106
  • Number of attempts: 6
Multiline to Single Line - 731 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #6 / 310
  • Number of attempts: 2
Yo To Hello - 1137 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 10
  • Position: #6 / 528
  • Number of attempts: 3
Simple, Practical, and Common - 33722 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: 44
  • Position: #7251 / 7442
  • Number of attempts: 1
prepend * to every non-blank line - 6337 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #117 / 1546
  • Number of attempts: 4
One number per line - 18755 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1954 / 3870
  • Number of attempts: 2
Applying same text modification in several lines - 2893 entries

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

  • Best score: 12
  • Best player score: 21
  • Position: #732 / 856
  • Number of attempts: 1
Add semicolons - 10881 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #511 / 3072
  • Number of attempts: 10
remove lines containing the word "reader" - 3604 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #363 / 1169
  • Number of attempts: 4
Box it - 7916 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 31
  • Position: #1458 / 1881
  • Number of attempts: 1
Just the middle - 11483 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #1346 / 4209
  • Number of attempts: 4
Vice versa - 7945 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #528 / 2138
  • Number of attempts: 2
One to Ten - 2227 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: #256 / 677
  • Number of attempts: 6
Line under headers - 2059 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 26
  • Position: #74 / 507
  • Number of attempts: 9
Delete to the end of the current line - 829 entries

Delete to the end of the current line, but keep the character under the cursor.

  • Best score: 5
  • Best player score: 5
  • Position: #206 / 400
  • Number of attempts: 3
unknown command - 167 entries

I want change 5 words

  • Best score: 7
  • Best player score: 7
  • Position: #52 / 87
  • Number of attempts: 2
learn vim in short time - 240 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #110 / 161
  • Number of attempts: 2
Where should I put the Newline? - 881 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Position: #213 / 437
  • Number of attempts: 3
Word frequency alignment - 291 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Position: #103 / 161
  • Number of attempts: 4
The name of the game - 668 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #277 / 361
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1606 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 8
  • Position: #126 / 446
  • Number of attempts: 6
SFD-ROC: ROT13 Phonics - 101 entries

A is for apple, b is for ball, etc... This familiar phonics poem has been rotated 13 characters. Make the letter match the word.

  • Best score: 6
  • Best player score: 6
  • Position: #61 / 73
  • Number of attempts: 1
Alphabet soup - 429 entries

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

  • Best score: 25
  • Best player score: 26
  • Position: #34 / 108
  • Number of attempts: 8
Remove semicolons after expressions - 654 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Position: #109 / 263
  • Number of attempts: 5
Generate English Alphabets - 487 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 23
  • Position: #26 / 206
  • Number of attempts: 5
Simple text editing with Vim - 12989 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 18
  • Position: #2690 / 3737
  • Number of attempts: 1

Contributed Challenges

Put a newline after every 10 lines in vim - 1660 entries

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

r4d1um
Twitter:

entered into 34 challenges

contributed 1 challenges