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

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #199 / 399
  • Number of attempts: 1
Plotting some variables in python - 1264 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: #91 / 268
  • 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 - 252 entries

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

  • Best score: 16
  • Best player score: 26
  • Position: #65 / 74
  • Number of attempts: 1
Enumerate Bullets - 221 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: #40 / 59
  • Number of attempts: 3
Rural Post - 4152 entries

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

  • Best score: 9
  • Best player score: 12
  • Position: #483 / 1029
  • Number of attempts: 3
Yo To Hello - 1066 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #287 / 489
  • Number of attempts: 2
Simple, Practical, and Common - 33028 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: #3649 / 7289
  • Number of attempts: 2
prepend * to every non-blank line - 6059 entries

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

  • Best score: 10
  • Best player score: 15
  • Position: #942 / 1481
  • Number of attempts: 2
One number per line - 18439 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 23
  • Position: #3074 / 3802
  • Number of attempts: 3
Unsemantic linewrapping - 849 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: #194 / 215
  • Number of attempts: 1
Add string initializers to an enum - 802 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 27
  • Position: #180 / 240
  • Number of attempts: 1
Add semicolons - 10714 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 15
  • Position: #2296 / 3018
  • Number of attempts: 1
Box it - 7718 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 34
  • Position: #1565 / 1841
  • Number of attempts: 1
Every other line - 2850 entries

AaAaAaA

  • Best score: 12
  • Best player score: 18
  • Position: #572 / 690
  • Number of attempts: 1
Team names - 1783 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 21
  • Position: #511 / 573
  • Number of attempts: 1
Vice versa - 7598 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1401 / 2059
  • Number of attempts: 1
Collect List - 4203 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #862 / 1173
  • Number of attempts: 3
I forgot quotes - 15804 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3339 / 4123
  • Number of attempts: 1
Words in parens - 12775 entries

We should all ace this, right?

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

Undergrad. at IIITD

entered into 21 challenges

contributed 0 challenges