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

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #284 / 556
  • Number of attempts: 1
Plotting some variables in python - 1661 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: #117 / 348
  • Number of attempts: 1
Make list of numbers from 1 to 30 more compact, but more confusing - 107 entries

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

  • Best score: 74
  • Best player score: 128
  • Position: #26 / 39
  • Number of attempts: 1
RUST Cargo.toml version to last - 355 entries

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

  • Best score: 16
  • Best player score: 26
  • Position: #85 / 100
  • Number of attempts: 1
Enumerate Bullets - 323 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 / 87
  • Number of attempts: 3
Rural Post - 4479 entries

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

  • Best score: 9
  • Best player score: 12
  • Position: #531 / 1097
  • Number of attempts: 3
Yo To Hello - 1130 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #287 / 524
  • Number of attempts: 2
Simple, Practical, and Common - 33616 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: #3710 / 7420
  • Number of attempts: 2
prepend * to every non-blank line - 6308 entries

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

  • Best score: 10
  • Best player score: 15
  • Position: #981 / 1537
  • Number of attempts: 2
One number per line - 18727 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 23
  • Position: #3114 / 3864
  • Number of attempts: 3
Unsemantic linewrapping - 928 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: #208 / 231
  • Number of attempts: 1
Add string initializers to an enum - 872 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 27
  • Position: #193 / 258
  • Number of attempts: 1
Add semicolons - 10852 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 15
  • Position: #2332 / 3063
  • Number of attempts: 1
Box it - 7905 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 34
  • Position: #1598 / 1876
  • Number of attempts: 1
Every other line - 2910 entries

AaAaAaA

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

The team names are misspelled.

  • Best score: 16
  • Best player score: 21
  • Position: #522 / 588
  • Number of attempts: 1
Vice versa - 7907 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1432 / 2128
  • Number of attempts: 1
Collect List - 4298 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #874 / 1190
  • Number of attempts: 3
I forgot quotes - 15983 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3381 / 4180
  • Number of attempts: 1
Words in parens - 12935 entries

We should all ace this, right?

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

Undergrad. at IIITD

entered into 21 challenges

contributed 0 challenges