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

From brakets to parens - 619 entries

This is one of the most common problem when you wrap an array for error handling. Vim is useful when you convert foo[i][j][k] into foo(i, j, k) for many times.

  • Best score: 24
  • Best player score: 25
  • Position: #17 / 140
  • Number of attempts: 3
Create json from a .env file - 1303 entries

A simple everyday task.

  • Best score: 39
  • Best player score: 42
  • Position: #52 / 303
  • Number of attempts: 5
Sort and Tag - 614 entries

The goal is to sort these lines alphabetically, assign a unique identifier to each line in the format "[01]", "[02]", etc., and then restore the original order of the lines while preserving the assigned identifiers.

  • Best score: 36
  • Best player score: 48
  • Position: #33 / 126
  • Number of attempts: 8
Changing date formats - 615 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 37
  • Position: #7 / 170
  • Number of attempts: 11
YAML to dotenv - 1226 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 16
  • Position: #48 / 262
  • Number of attempts: 8
Fix the git merge conflicts - 286 entries

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 38
  • Position: #7 / 78
  • Number of attempts: 6
Nested JSON Flattener - 101 entries

Transform a deeply nested JSON structure into a flattened key-value format where each path is represented by dot notation

  • Best score: 44
  • Best player score: 56
  • Position: #10 / 27
  • Number of attempts: 4
Replace markdown sections with numbering - 284 entries

Replace each section and subsection with their respective numbers

  • Best score: 29
  • Best player score: 29
  • Position: #3 / 72
  • Number of attempts: 7
Word completion - 279 entries

Try to complete these options within 20 keystrokes.

  • Best score: 20
  • Best player score: 22
  • Position: #24 / 72
  • Number of attempts: 6
Search different SQL column with similar where clause - 314 entries

Replace a column in the where clause and convert all numbers from text to numeric, by replacing the leading 0 with the code 359.

  • Best score: 22
  • Best player score: 22
  • Position: #15 / 69
  • Number of attempts: 9
Move to corresponding lines - 285 entries

Move the values to the corresponding lines.

  • Best score: 16
  • Best player score: 20
  • Position: #25 / 66
  • Number of attempts: 5
Rearrange array to one line - 758 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #25 / 182
  • Number of attempts: 8
Change LaTex itemizations formats - 112 entries

Inspired by the way my professor formats their LaTeX assignments.

  • Best score: 43
  • Best player score: 43
  • Position: #4 / 19
  • Number of attempts: 7
Case matching substitution - 61 entries

Swap every "lorem" for "ipsum", keeping the letter cases the same.

  • Best score: 31
  • Best player score: 47
  • Position: #11 / 17
  • Number of attempts: 5
Format a long line - 105 entries

Reformat long lines (gq), textwidth=78, no trailing spaces.

  • Best score: 17
  • Best player score: 17
  • Position: #5 / 32
  • Number of attempts: 6
New teacher - 1419 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 21
  • Position: #63 / 299
  • Number of attempts: 6
Fix the shell script! - 2651 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 26
  • Position: #62 / 616
  • Number of attempts: 7
vimtutor, but you can cheat - 24 entries

It's time to revisit vimtutor, but as an experienced Vim user! Your goal is to change the file to appear as if you had gone through the tutorial, but you do NOT need to actually complete the tutorial as written or do anything that doesn't result in changes to the file. You may use whatever you have in your Vim toolbelt that's allowed under VimGolf rules. The whole tutorial is too large to submit, so only the relevant lesson headers and associated practice lines are presented in this challenge. You will have to reference the tutor for the original instructions if you need them: https://raw.githubusercontent.com/vim/vim/4466ad6baa22485abb1147aca3340cced4778a66/runtime/tutor/tutor

  • Best score: 142
  • Best player score: 142
  • Position: #1 / 11
  • Number of attempts: 3
Simple, Practical, and Common - 33866 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: #2422 / 7474
  • Number of attempts: 5
citizen_hacks_2019_part1 - 57 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 52
  • Best player score: 52
  • Position: #7 / 18
  • Number of attempts: 3
One number per line - 18831 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #774 / 3889
  • Number of attempts: 8
citizen_hacks_2019_challenge2 - 202 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Position: #69 / 104
  • Number of attempts: 2
Com(m)a Trouble - 3941 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 12
  • Position: #186 / 892
  • Number of attempts: 6
citizen_hacks_2019_challenge3 - 40 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 4
  • Best player score: 4
  • Position: #35 / 37
  • Number of attempts: 1
citizen_hacks_2019_part2 - 35 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 40
  • Best player score: 40
  • Position: #3 / 13
  • Number of attempts: 4
Mirrored text - 185 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 14
  • Position: #23 / 72
  • Number of attempts: 8
citizen_hacks_2019_challenge4 - 101 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 5
  • Best player score: 5
  • Position: #56 / 67
  • Number of attempts: 2
citizen_hacks_2019_challenge5 - 149 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Position: #53 / 78
  • Number of attempts: 2
citizen_hacks_2019_challenge6 - 66 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 3
  • Best player score: 3
  • Position: #50 / 52
  • Number of attempts: 1
Hole-in-one - 1024 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 16
  • Position: #98 / 305
  • Number of attempts: 6
citizen_hacks_2019_challenge1 - 54 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 5
  • Best player score: 5
  • Position: #41 / 46
  • Number of attempts: 1
Calculate the table totals - 152 entries

Go ahead... commit the treachery of using vim as a spreadsheet.

  • Best score: 33
  • Best player score: 33
  • Position: #11 / 46
  • Number of attempts: 6
Get rid of html tags - 423 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 12
  • Best player score: 25
  • Position: #215 / 245
  • Number of attempts: 1
Simple text editing with Vim - 13262 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 13
  • Position: #753 / 3810
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 7389 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 7
  • Best player score: 32
  • Position: #182 / 1825
  • Number of attempts: 8
Vsevolod Rychkov
Github:

entered into 35 challenges

contributed 0 challenges