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 - 1035 entries

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #232 / 458
  • Number of attempts: 1
Plotting some variables in python - 1404 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: #98 / 296
  • Number of attempts: 1
Make list of numbers from 1 to 30 more compact, but more confusing - 81 entries

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

  • Best score: 75
  • Best player score: 128
  • Position: #22 / 33
  • Number of attempts: 1
RUST Cargo.toml version to last - 283 entries

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

  • Best score: 16
  • Best player score: 26
  • Position: #69 / 80
  • Number of attempts: 1
Enumerate Bullets - 253 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: #45 / 67
  • Number of attempts: 3
Rural Post - 4257 entries

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

  • Best score: 9
  • Best player score: 12
  • Position: #496 / 1045
  • Number of attempts: 3
Yo To Hello - 1081 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #287 / 497
  • Number of attempts: 2
Simple, Practical, and Common - 33136 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: #3658 / 7308
  • Number of attempts: 2
prepend * to every non-blank line - 6120 entries

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

  • Best score: 10
  • Best player score: 15
  • Position: #950 / 1493
  • Number of attempts: 2
One number per line - 18497 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 23
  • Position: #3083 / 3815
  • Number of attempts: 3
Unsemantic linewrapping - 861 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: #197 / 218
  • Number of attempts: 1
Add string initializers to an enum - 836 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 27
  • Position: #185 / 246
  • Number of attempts: 1
Add semicolons - 10720 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 15
  • Position: #2299 / 3023
  • Number of attempts: 1
Box it - 7756 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 34
  • Position: #1570 / 1847
  • Number of attempts: 1
Every other line - 2856 entries

AaAaAaA

  • Best score: 12
  • Best player score: 18
  • Position: #573 / 691
  • Number of attempts: 1
Team names - 1790 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 21
  • Position: #512 / 575
  • Number of attempts: 1
Vice versa - 7643 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1405 / 2072
  • Number of attempts: 1
Collect List - 4212 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #863 / 1176
  • Number of attempts: 3
I forgot quotes - 15852 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3349 / 4136
  • Number of attempts: 1
Words in parens - 12790 entries

We should all ace this, right?

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

Undergrad. at IIITD

entered into 21 challenges

contributed 0 challenges