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 - 1558 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: #296 / 343
  • Number of attempts: 1
Populate 3D bone names list - 450 entries

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

  • Best score: 21
  • Best player score: 37
  • Position: #97 / 119
  • Number of attempts: 2
Remove line numbers - 540 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: #71 / 144
  • Number of attempts: 4
Find fix point of cos - 1125 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: #166 / 337
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 485 entries

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

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

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

  • Best score: 14
  • Best player score: 23
  • Position: #316 / 488
  • Number of attempts: 1
Reformat symbols in list - 1466 entries

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

  • Best score: 24
  • Best player score: 44
  • Position: #275 / 322
  • Number of attempts: 2
delete swap - 1523 entries

delete all swap

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 43
  • Position: #399 / 541
  • Number of attempts: 1
Visual block training - 1001 entries

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

  • Best score: 17
  • Best player score: 35
  • Position: #97 / 183
  • Number of attempts: 1
hello-world-vimgolf - 2353 entries

Simple number generation

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

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

  • Best score: 19
  • Best player score: 36
  • Position: #90 / 121
  • Number of attempts: 1
simple replacements - 1658 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 23
  • Position: #200 / 370
  • Number of attempts: 5
Python dataclasses - 1104 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 39
  • Position: #248 / 277
  • Number of attempts: 1
Modernise code - 1333 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 41
  • Position: #133 / 307
  • Number of attempts: 7
Multiline to Single Line - 668 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #229 / 292
  • Number of attempts: 3
xrandr outputs and dashes - 652 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 / 213
  • Number of attempts: 10
Simple, Practical, and Common - 33385 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: #4042 / 7364
  • Number of attempts: 3
Adrián Fidalgo-Díaz
Github:

entered into 18 challenges

contributed 0 challenges