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

Reformat symbols in list - 1477 entries

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

  • Best score: 24
  • Best player score: 40
  • Position: #252 / 327
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1600 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 13
  • Position: #277 / 534
  • Number of attempts: 1
Plotting some variables in python - 1597 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 40
  • Position: #115 / 342
  • Number of attempts: 1
Make list of numbers from 1 to 30 more compact, but more confusing - 95 entries

Change the naming logic of numbers to end up with less lines.

  • Best score: 74
  • Best player score: 128
  • Position: #25 / 37
  • Number of attempts: 1
RUST Cargo.toml version to last - 325 entries

RUST Cargo.toml version to last. rusty practice on vimgolf

  • Best score: 16
  • Best player score: 26
  • Position: #81 / 96
  • Number of attempts: 1
Enumerate Bullets - 308 entries

We will need to refer to the bullet points in our document explicitly later, so we need to assign them some ID's!

  • Best score: 20
  • Best player score: 33
  • Position: #56 / 83
  • Number of attempts: 3
Rural Post - 4405 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 12
  • Position: #521 / 1082
  • Number of attempts: 3
Yo To Hello - 1122 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #287 / 520
  • Number of attempts: 2
Simple, Practical, and Common - 33420 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: 26
  • Position: #3690 / 7375
  • Number of attempts: 2
prepend * to every non-blank line - 6248 entries

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

  • Best score: 10
  • Best player score: 15
  • Position: #973 / 1526
  • Number of attempts: 2
One number per line - 18638 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 23
  • Position: #3104 / 3848
  • Number of attempts: 3
Unsemantic linewrapping - 895 entries

[Inspired by a blog post I read: https://scott.mn/2014/02/21/semantic_linewrapping/. Text adapted.] Sometimes when editing a Markdown file, I wrap the lines semantically. Instead of inserting a newline at 70 columns (or whatever), or making paragraphs one long line, I put in newlines at a point that seems logical to me. This may seem silly, but it produces better diffs. Semantic linewrapping also makes editing snappier. I can delete, edit or insert sentences easily using linewise operations. Code-oriented text editors like Vim and [REDACTED] are really good at this kind of manipulation. Editing text that hasn't been wrapped semantically is a pain, though:

  • Best score: 9
  • Best player score: 15
  • Position: #203 / 225
  • Number of attempts: 1
Add string initializers to an enum - 862 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 27
  • Position: #191 / 254
  • Number of attempts: 1
Add semicolons - 10806 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 15
  • Position: #2321 / 3049
  • Number of attempts: 1
Box it - 7836 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 34
  • Position: #1591 / 1868
  • Number of attempts: 1
Every other line - 2901 entries

AaAaAaA

  • Best score: 12
  • Best player score: 18
  • Position: #583 / 702
  • Number of attempts: 1
Team names - 1808 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 21
  • Position: #518 / 582
  • Number of attempts: 1
Vice versa - 7813 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1423 / 2106
  • Number of attempts: 1
Collect List - 4266 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #872 / 1187
  • Number of attempts: 3
I forgot quotes - 15935 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3370 / 4163
  • Number of attempts: 1
Words in parens - 12863 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 20
  • Position: #3315 / 3948
  • Number of attempts: 1
Manas
Twitter:

Undergrad. at IIITD

entered into 21 challenges

contributed 0 challenges