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

Data reformat - 271 entries

Reformat this copy-paste data! #csv

  • Best score: 38
  • Best player score: 38
  • Position: #6 / 60
  • Number of attempts: 7
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: #36 / 213
  • Number of attempts: 1
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: 22
  • Position: #609 / 7364
  • Number of attempts: 10
prepend * to every non-blank line - 6208 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 10
  • Position: #203 / 1517
  • Number of attempts: 6
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #264 / 3842
  • Number of attempts: 9
Quote modules - 1054 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 22
  • Position: #60 / 274
  • Number of attempts: 6
V to the i - 4751 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Position: #731 / 1879
  • Number of attempts: 4
Applying same text modification in several lines - 2845 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 13
  • Position: #236 / 840
  • Number of attempts: 5
Refactor typescript arrow function type - 302 entries

Make arrow function type less verbose and easier to read

  • Best score: 20
  • Best player score: 32
  • Position: #61 / 68
  • Number of attempts: 1
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #565 / 3044
  • Number of attempts: 3
Com(m)a Trouble - 3675 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 13
  • Position: #302 / 827
  • Number of attempts: 6
Box it - 7828 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 27
  • Position: #1175 / 1865
  • Number of attempts: 2
Cool or not? - 793 entries

abc trying to be cool or not...

  • Best score: 15
  • Best player score: 16
  • Position: #115 / 226
  • Number of attempts: 2
multiple cursor alternative - 1474 entries

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

  • Best score: 19
  • Best player score: 19
  • Position: #87 / 376
  • Number of attempts: 9
Every other line - 2886 entries

AaAaAaA

  • Best score: 12
  • Best player score: 13
  • Position: #255 / 700
  • Number of attempts: 8
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2253 / 4164
  • Number of attempts: 1
Interweave two blocks of text - 631 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

  • Best score: 15
  • Best player score: 15
  • Position: #16 / 211
  • Number of attempts: 3
Remember VimGolf Rules ! - 257 entries

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Position: #114 / 138
  • Number of attempts: 2
Simple addition - 310 entries

The right side of the equation is already there. We just need the left one now.

  • Best score: 12
  • Best player score: 12
  • Position: #47 / 117
  • Number of attempts: 3
Nesting SASS - 261 entries

Move a block inside another block and indent it

  • Best score: 9
  • Best player score: 9
  • Position: #31 / 93
  • Number of attempts: 2
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #300 / 2101
  • Number of attempts: 8
C Reformatting - 688 entries

You may use Visual mode... or not. #uppercase

  • Best score: 30
  • Best player score: 32
  • Position: #32 / 161
  • Number of attempts: 7
Hello ${world} - 299 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

  • Best score: 24
  • Best player score: 24
  • Position: #12 / 94
  • Number of attempts: 4
Change part of a function name in multiple occurrences - 639 entries

Change the middle part of the function name in multiple places, preferably using the next and dot commands.

  • Best score: 14
  • Best player score: 15
  • Position: #118 / 203
  • Number of attempts: 4
Array transposition - 2378 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Position: #60 / 443
  • Number of attempts: 6
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #444 / 4161
  • Number of attempts: 7
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 14
  • Position: #406 / 1129
  • Number of attempts: 5
A HAPPY NEW YEAR 2014 ! - 10624 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1523 / 3666
  • Number of attempts: 3
Change The Perspective - 36 entries

This is a go game recodes file(.sgf file, refer to http://www.red-bean.com/sgf/). It base on such a coordinate system: in vertical direction, is from top(farthest end) to bottom, mark as a,b,c,...,s(19*19 board); in horizontal direction, is from left to right, uses the same notations. For Example, the coordinate notation 'cq', is the position at the bottom-left corner(vertical coordinate first). The record is from one player's perspective. We need to change to another's, but we don't want to change coordinate system, let it keep top to bottom and left to right. so we have to change the coordinates, a <-> s, b <-> r,c <-> q, etc. the Position 'cq', as transformation, it will be 'qd'.

  • Best score: 33
  • Best player score: 54
  • Position: #21 / 22
  • Number of attempts: 1
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1099 / 3946
  • Number of attempts: 5
Whitespace, empty lines and tabs - 3339 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 16
  • Position: #19 / 736
  • Number of attempts: 11
Karol Łukaszewicz
Twitter:

entered into 31 challenges

contributed 0 challenges