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

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #274 / 527
  • Number of attempts: 1
Plotting some variables in python - 1567 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: #114 / 334
  • Number of attempts: 1
Make list of numbers from 1 to 30 more compact, but more confusing - 90 entries

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

  • Best score: 74
  • Best player score: 128
  • Position: #24 / 36
  • Number of attempts: 1
RUST Cargo.toml version to last - 320 entries

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

  • Best score: 16
  • Best player score: 26
  • Position: #80 / 95
  • Number of attempts: 1
Enumerate Bullets - 292 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: #54 / 80
  • Number of attempts: 3
Rural Post - 4368 entries

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

  • Best score: 9
  • Best player score: 12
  • Position: #516 / 1072
  • Number of attempts: 3
Yo To Hello - 1115 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #287 / 518
  • Number of attempts: 2
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: 26
  • Position: #3688 / 7364
  • Number of attempts: 2
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: 15
  • Position: #968 / 1517
  • Number of attempts: 2
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 23
  • Position: #3101 / 3842
  • Number of attempts: 3
Unsemantic linewrapping - 890 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: #202 / 224
  • 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 - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 15
  • Position: #2317 / 3044
  • Number of attempts: 1
Box it - 7828 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 34
  • Position: #1588 / 1865
  • Number of attempts: 1
Every other line - 2886 entries

AaAaAaA

  • Best score: 12
  • Best player score: 18
  • Position: #581 / 700
  • Number of attempts: 1
Team names - 1805 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 21
  • Position: #517 / 581
  • Number of attempts: 1
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1422 / 2101
  • Number of attempts: 1
Collect List - 4264 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #871 / 1186
  • Number of attempts: 3
I forgot quotes - 15931 entries

Oops.

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

We should all ace this, right?

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

Undergrad. at IIITD

entered into 21 challenges

contributed 0 challenges