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 - 2058 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: #398 / 457
  • Number of attempts: 1
Populate 3D bone names list - 638 entries

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

  • Best score: 21
  • Best player score: 37
  • Position: #133 / 166
  • Number of attempts: 2
Remove line numbers - 752 entries

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

  • Best score: 9
  • Best player score: 13
  • Position: #96 / 201
  • Number of attempts: 4
Find fix point of cos - 1444 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: #182 / 427
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 572 entries

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

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

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

  • Best score: 14
  • Best player score: 23
  • Position: #377 / 570
  • Number of attempts: 1
Reformat symbols in list - 1635 entries

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

  • Best score: 24
  • Best player score: 44
  • Position: #301 / 352
  • Number of attempts: 2
delete swap - 1818 entries

delete all swap

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 43
  • Position: #456 / 616
  • Number of attempts: 1
Visual block training - 1096 entries

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

  • Best score: 17
  • Best player score: 35
  • Position: #107 / 207
  • Number of attempts: 1
hello-world-vimgolf - 2513 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #301 / 717
  • 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 - 1833 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 23
  • Position: #211 / 396
  • Number of attempts: 5
Python dataclasses - 1229 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 39
  • Position: #276 / 308
  • Number of attempts: 1
Modernise code - 1420 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 41
  • Position: #143 / 328
  • Number of attempts: 7
Multiline to Single Line - 747 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #229 / 318
  • Number of attempts: 3
xrandr outputs and dashes - 725 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 / 226
  • Number of attempts: 10
Simple, Practical, and Common - 33866 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: #4089 / 7474
  • Number of attempts: 3
Adrián Fidalgo-Díaz
Github:

entered into 18 challenges

contributed 0 challenges