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 - 1848 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: #351 / 405
  • Number of attempts: 1
Populate 3D bone names list - 580 entries

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

  • Best score: 21
  • Best player score: 37
  • Position: #117 / 147
  • Number of attempts: 2
Remove line numbers - 680 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #88 / 184
  • Number of attempts: 4
Find fix point of cos - 1308 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: #175 / 384
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 532 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #160 / 294
  • Number of attempts: 2
Paste a column after a column - 2488 entries

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

  • Best score: 14
  • Best player score: 23
  • Position: #353 / 538
  • Number of attempts: 1
Reformat symbols in list - 1581 entries

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

  • Best score: 24
  • Best player score: 44
  • Position: #289 / 339
  • Number of attempts: 2
delete swap - 1758 entries

delete all swap

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 43
  • Position: #432 / 587
  • Number of attempts: 1
Visual block training - 1069 entries

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

  • Best score: 17
  • Best player score: 35
  • Position: #104 / 203
  • Number of attempts: 1
hello-world-vimgolf - 2484 entries

Simple number generation

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

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

  • Best score: 19
  • Best player score: 36
  • Position: #97 / 130
  • Number of attempts: 1
simple replacements - 1749 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 23
  • Position: #204 / 379
  • Number of attempts: 5
Python dataclasses - 1127 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 39
  • Position: #252 / 283
  • Number of attempts: 1
Modernise code - 1386 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 41
  • Position: #138 / 318
  • Number of attempts: 7
Multiline to Single Line - 695 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #229 / 300
  • Number of attempts: 3
xrandr outputs and dashes - 700 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 / 220
  • Number of attempts: 10
Simple, Practical, and Common - 33545 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: #4059 / 7399
  • Number of attempts: 3
Adrián Fidalgo-Díaz
Github:

entered into 18 challenges

contributed 0 challenges