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 - 1757 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: 39
  • Position: #336 / 385
  • Number of attempts: 1
Populate 3D bone names list - 525 entries

Ran into this at work, excited to see how this gets optimized

  • Best score: 21
  • Best player score: 37
  • Position: #111 / 141
  • Number of attempts: 2
Remove line numbers - 654 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 8
  • Best player score: 13
  • Position: #84 / 173
  • Number of attempts: 4
Find fix point of cos - 1204 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: 15
  • Position: #173 / 365
  • Number of attempts: 2
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: #160 / 287
  • Number of attempts: 2
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: 23
  • Position: #342 / 523
  • Number of attempts: 1
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: 44
  • Position: #284 / 334
  • Number of attempts: 2
delete swap - 1650 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #299 / 514
  • Number of attempts: 3
Fix the shell script! - 2431 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 43
  • Position: #418 / 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: 35
  • Position: #101 / 195
  • Number of attempts: 1
hello-world-vimgolf - 2472 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #301 / 699
  • Number of attempts: 3
Learn to ask for :help - 572 entries

Learn to use the help to reduce your strokes...

  • Best score: 19
  • Best player score: 36
  • Position: #96 / 128
  • Number of attempts: 1
simple replacements - 1710 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 23
  • Position: #203 / 378
  • Number of attempts: 5
Python dataclasses - 1121 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 39
  • Position: #251 / 281
  • Number of attempts: 1
Modernise code - 1368 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 41
  • Position: #137 / 316
  • Number of attempts: 7
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: #229 / 298
  • Number of attempts: 3
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: #144 / 218
  • Number of attempts: 10
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: 27
  • Position: #4051 / 7384
  • Number of attempts: 3
Adrián Fidalgo-Díaz
Github:

entered into 18 challenges

contributed 0 challenges