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

Quicksort - 1559 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 7
  • Position: #121 / 344
  • Number of attempts: 8
Find fix point of cos - 1137 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: 16
  • Position: #221 / 340
  • Number of attempts: 2
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: #116 / 272
  • Number of attempts: 2
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: 16
  • Position: #160 / 491
  • Number of attempts: 6
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: 33
  • Position: #195 / 323
  • Number of attempts: 4
Poorly indented Python comments - 1173 entries

Fix the alignment of some Python comments as quickly as possible.

  • Best score: 15
  • Best player score: 15
  • Position: #23 / 204
  • Number of attempts: 10
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: 29
  • Position: #13 / 249
  • Number of attempts: 11
Fix the shell script! - 2344 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 26
  • Position: #15 / 542
  • Number of attempts: 11
Visual block training - 1005 entries

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

  • Best score: 17
  • Best player score: 21
  • Position: #53 / 185
  • Number of attempts: 3
Innocent Monster - 164 entries

You have the tools, just create him!

  • Best score: 60
  • Best player score: 138
  • Position: #38 / 47
  • 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: 11
  • Position: #106 / 525
  • Number of attempts: 3
Wikitext headings to markdown - 980 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #20 / 203
  • Number of attempts: 10
hello-world-vimgolf - 2361 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #161 / 667
  • Number of attempts: 4
Contribute to keyboard mashing - 841 entries

Speak in tongues

  • Best score: 17
  • Best player score: 20
  • Position: #178 / 257
  • Number of attempts: 2
Reordering Lorem Ipsum - 261 entries

Who even sorted this?

  • Best score: 13
  • Best player score: 14
  • Position: #31 / 61
  • Number of attempts: 8
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: 19
  • Position: #15 / 175
  • Number of attempts: 16
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: 35
  • Position: #73 / 334
  • Number of attempts: 8
Transpose a python matrix - 845 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 24
  • Position: #30 / 134
  • Number of attempts: 16
Python dataclasses - 1105 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 21
  • Position: #119 / 278
  • Number of attempts: 4
Python Hello World! Reformatting - 938 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 46
  • Position: #298 / 364
  • Number of attempts: 2
change parenthesis - 278 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 10
  • Position: #138 / 156
  • Number of attempts: 1
Word frequency alignment - 274 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: #113 / 157
  • Number of attempts: 3
Insert a Markdown link - 431 entries

Put a link in a markdown document, using the after-the-paragraph format.

  • Best score: 22
  • Best player score: 34
  • Position: #134 / 143
  • Number of attempts: 3
Get rid of html tags - 368 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 15
  • Best player score: 16
  • Position: #11 / 217
  • Number of attempts: 2
John Xu
Twitter:

musa student 2021

entered into 24 challenges

contributed 0 challenges