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

C to python code snippet - 29 entries

C code can be easily translated into Python code. However, the difference in syntax can make this process tedious and time-consuming. Can Vim help you here?

  • Best score: 48
  • Best player score: 49
  • Number of attempts: 5
Mr. Hacker - 22 entries

Elvin is hacker. He has piece of users database from some social net site. Recently he installed Vim, and he wants to convert CSV DB to specific format `key=value' where `key' is login and `value' is password, but password in DB is encrypted in ROT13. Help him.

  • Best score: 19
  • Best player score: 20
  • Number of attempts: 1
Python: Def to Lambda - 84 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 2
Turn the x - 83 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 10
Format the CSS - 38 entries

You just copied some CSS color names from the web and need to add them to your python module. Create the COLORS variable and assign a dict() with the names as keys and hex-colors as values. BEWARE OF THE TABS!!

  • Best score: 41
  • Best player score: 44
  • Number of attempts: 4
Rural Post - 2482 entries

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

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 2
Levenshtein distance - 49 entries

Compute distance for each pair. Notice that this recursive implementation is very inefficient. Wagner-Fischer algorithm is iterative and much faster. #vimscript

  • Best score: 28
  • Best player score: 28
  • Number of attempts: 5
Satisfy the go linter - 1188 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 20
  • Number of attempts: 11
Add quotes to ansible playbook - 319 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 9
  • Number of attempts: 2
Multiline to Single Line - 207 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
xrandr outputs and dashes - 409 entries

uh oh, different video drivers identify display outputs with more dashes. Quick, need to change this xrandr script!

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 516 entries

ThunderLinks are durable hyperlinks to specific email messages generated from Thunderbird in HTML format. Leverage the power of vim to make them suitable for a markdown-formatted file.

  • Best score: 18
  • Best player score: 22
  • Number of attempts: 3
Yo To Hello - 756 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 3
Alphabet soup - 228 entries

Create a column of all alphabet characters organized in a funky way

  • Best score: 25
  • Best player score: 38
  • Number of attempts: 4
Get mail address from outlook format - 471 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 2
prepend * to every non-blank line - 5144 entries

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

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 4
Quote modules - 874 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 22
  • Number of attempts: 5
Hogwarts Email Sorting - 709 entries

Given a list of emails, get the students full name and their associated house.

  • Best score: 20
  • Best player score: 21
  • Number of attempts: 3
Refactor typescript arrow function type - 221 entries

Make arrow function type less verbose and easier to read

  • Best score: 20
  • Best player score: 23
  • Number of attempts: 1
SCREAMING_SNAKE_CASE to Title Case - 963 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: 20
  • Number of attempts: 1
citizen_hacks_2019_part9 - 7 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 55
  • Best player score: 55
  • Number of attempts: 1
citizen_hacks_2019_part4 - 5 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 38
  • Best player score: 38
  • Number of attempts: 1
citizen_hacks_2019_part2 - 8 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 41
  • Best player score: 41
  • Number of attempts: 4
citizen_hacks_2019_part1 - 15 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 52
  • Best player score: 52
  • Number of attempts: 3
citizen_hacks_2019_challenge1 - 29 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
Add string initializers to an enum - 699 entries

Change Typescript enum so that it has string initializers.

  • Best score: 21
  • Best player score: 21
  • Number of attempts: 4
Unsemantic linewrapping - 738 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: 9
  • Number of attempts: 2
Bad Copy Syntax - 1799 entries

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

  • Best score: 10
  • Best player score: 20
  • Number of attempts: 3
Reorder the groups - 982 entries

Change the order so that the groups of fruit come before the vegetables.

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 2
Add semicolons - 9582 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 3
Cool or not? - 703 entries

abc trying to be cool or not...

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 4
Box it - 7260 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 3
Increment each number - 874 entries

Increment each number individually by one

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 2
One to Ten - 1948 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
remove lines containing the word "reader" - 3282 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
Applying same text modification in several lines - 2623 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 1
Com(m)a Trouble - 3108 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 6
Swap values inside brackets - 2336 entries

Easy challenge.

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 3
TAR archive pretty print - 17 entries

Will you use isk ?

  • Best score: 24
  • Best player score: 25
  • Number of attempts: 3
mp3 - Cutlist - 25 entries

An audio CD was accidentally ripped into one single mp3 file. A dummy cue-file now needs to be filled out with the correct values to get single mp3 files.

  • Best score: 67
  • Best player score: 67
  • Number of attempts: 6
Team names - 1718 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 1
Fiddle percentages into real numbers - 767 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
Every other line - 2718 entries

AaAaAaA

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 6
Copy three lines - 2672 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 21
  • Number of attempts: 1
One number per line - 17686 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 13
Swap values - 4313 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
Vice versa - 7224 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 6
Simple, Practical, and Common - 32042 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
  • Number of attempts: 8
Collect List - 4076 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
Just the middle - 10905 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 2
Simple Maths - 35 entries

Not much to say, discover by yourself!

  • Best score: 26
  • Best player score: 41
  • Number of attempts: 1
I forgot quotes - 15279 entries

Oops.

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 4
Basic renumbering - 5322 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 1
-a-b-c- - 3008 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 4
V to the i - 4526 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 2
Untangle my tail, please! - 45 entries

You know, this words were playing to chase their tails and Oops! What happened? Now we have a complete mess, their tails are totally tangled, can you please help them to untangle their tails?

  • Best score: 16
  • Best player score: 18
  • Number of attempts: 1
Words in parens - 12467 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 1
Presidential Sorting - 47 entries

Given a nice CSV formatted arrangement of the Presidents of the United States, we need to print out an alphabetical list in pretty columns. Prove that vim can conquer this basic Excel task!

  • Best score: 40
  • Best player score: 48
  • Number of attempts: 1
Simple text editing with Vim - 11232 entries

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

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
Tanzeel Kazi
Twitter:

Software developer

entered into 59 challenges

contributed 0 challenges