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

Rearrange array to one line - 571 entries

Rearrange the array content on only one line, and remove trailing commas

  • Best score: 13
  • Best player score: 17
  • Position: #45 / 137
  • Number of attempts: 9
Copy punctuation - 460 entries

I want to copy the last line’s brackets, quotes, and commas to each line. How?

  • Best score: 19
  • Best player score: 85
  • Position: #100 / 113
  • Number of attempts: 1
CSV to MD format - 413 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 89
  • Position: #65 / 94
  • Number of attempts: 2
Simple, Practical, and Common - 33586 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: 22
  • Position: #1863 / 7409
  • Number of attempts: 5
prepend * to every non-blank line - 6304 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #53 / 1536
  • Number of attempts: 7
citizen_hacks_2019_part1 - 54 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 52
  • Best player score: 65
  • Position: #15 / 17
  • Number of attempts: 1
add line and index - 100 entries

a missed line and index names need to be added

  • Best score: 44
  • Best player score: 63
  • Position: #26 / 29
  • Number of attempts: 3
Prime Numbers - 354 entries

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 39
  • Position: #27 / 104
  • Number of attempts: 4
citizen_hacks_2019_challenge2 - 195 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Position: #12 / 102
  • Number of attempts: 2
Unsemantic linewrapping - 926 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: 10
  • Position: #106 / 230
  • Number of attempts: 4
SCREAMING_SNAKE_CASE to Title Case - 1214 entries

Convert strings in SCREAMING_SNAKE_CASE to Title Case. Examples: EMPLOYEE_NAME -> Employee Name REVENUE_YEAR_TO_DATE -> Revenue Year To Date SALARY -> Salary

  • Best score: 19
  • Best player score: 33
  • Position: #201 / 249
  • Number of attempts: 1
Add semicolons - 10848 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #927 / 3061
  • Number of attempts: 8
Bad Copy Syntax - 2028 entries

Copy should be from right to left, but sometimes you type it wrong.

  • Best score: 18
  • Best player score: 28
  • Position: #408 / 522
  • Number of attempts: 1
citizen_hacks_2019_challenge3 - 38 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 4
  • Best player score: 4
  • Position: #13 / 35
  • Number of attempts: 1
Extract wireshark capture filter - 215 entries

Extract wireshark capture filter from IP plan

  • Best score: 25
  • Best player score: 27
  • Position: #29 / 71
  • Number of attempts: 2
Box it - 7902 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 27
  • Position: #1145 / 1874
  • Number of attempts: 3
Vice versa - 7903 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #480 / 2125
  • Number of attempts: 7
citizen_hacks_2019_challenge4 - 95 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 5
  • Best player score: 5
  • Position: #12 / 65
  • Number of attempts: 1
citizen_hacks_2019_challenge5 - 147 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Position: #9 / 77
  • Number of attempts: 2
Line under headers - 2037 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 31
  • Position: #292 / 501
  • Number of attempts: 1
Comparing Schema With Diff - 52 entries

Sometimes databases output things differently one to another. Fixing things that are out of order will make the diffs more usable.

  • Best score: 30
  • Best player score: 36
  • Position: #8 / 10
  • Number of attempts: 2
citizen_hacks_2019_challenge6 - 65 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 3
  • Best player score: 3
  • Position: #17 / 51
  • Number of attempts: 1
Song Transcription Oops - 243 entries

When transcribing vocal music to Canjo Tab you can start by finding the lowest note and assigning that to zero and working your way up from there. However, without fail, I tend to miscount the notes and when I am near done I find a lower note. I mark this with a "z". This means I have to increase all the previous ones by 1. just a sting of numbers :)

  • Best score: 15
  • Best player score: 15
  • Position: #17 / 78
  • Number of attempts: 5
I forgot quotes - 15974 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #895 / 4175
  • Number of attempts: 6
Words in parens - 12928 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1006 / 3960
  • Number of attempts: 6
ASCII-art Histogram - 320 entries

Create an ASCCI-art histogram for the given numbers. Make sure not to leave trailing whitespaces. Thanks to VimGolf I recently discovered a feature of Vim thAT blew my mind. I'm curious to see what real ninjas make of it ;-)

  • Best score: 33
  • Best player score: 43
  • Position: #35 / 57
  • Number of attempts: 2
citizen_hacks_2019_challenge1 - 51 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 5
  • Best player score: 5
  • Position: #11 / 45
  • Number of attempts: 1
calculations - 312 entries

Complete these (weird) calculations.

  • Best score: 38
  • Best player score: 41
  • Position: #38 / 68
  • Number of attempts: 9
J̻̕ͅo̠̻̘h̼̖n̙̩̝͕ D̹̗̗͝oe̶̱̥͙
Twitter:

:(){ :|: &};:

entered into 28 challenges

contributed 0 challenges