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 - 931 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: 26
  • Position: #65 / 214
  • Number of attempts: 7
Create json from a .env file - 1518 entries

A simple everyday task.

  • Best score: 39
  • Best player score: 42
  • Position: #60 / 353
  • Number of attempts: 8
Reordering properties - 1136 entries

Arrange the CSS lines for the #topbar selector based on their complete line length, from shortest to longest.

  • Best score: 24
  • Best player score: 44
  • Position: #57 / 269
  • Number of attempts: 10
Changing date formats - 687 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 53
  • Position: #45 / 188
  • Number of attempts: 7
YAML to dotenv - 1459 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 17
  • Position: #78 / 298
  • Number of attempts: 4
Swap columns and transform to CSV format - 426 entries

Turn this spreadsheet output into a CSV file but first swap the columns

  • Best score: 16
  • Best player score: 17
  • Position: #66 / 154
  • Number of attempts: 1
Generate an entry for each month - 369 entries

The input file contains a URI with a month in it. Generate the URIs for all the other months up to a couple of years

  • Best score: 27
  • Best player score: 39
  • Position: #36 / 91
  • Number of attempts: 2
Fix the Scala Method - 306 entries

Fix the missing semicolons and the Int type, ensure the floating point division, and remove the unnecessary return.

  • Best score: 2
  • Best player score: 22
  • Position: #40 / 98
  • Number of attempts: 3
Change class fields from camel case to snake case - 568 entries

This is the reverse of the previous challenge: https://www.vimgolf.com/challenges/9v006705493c000000000513

  • Best score: 18
  • Best player score: 19
  • Position: #50 / 132
  • Number of attempts: 2
Reorganize Pokémon - 772 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 21
  • Position: #122 / 214
  • Number of attempts: 3
Replace csv column if it's not empty - 255 entries

Replace the credit_score_percentile column with the value 0.0 but leave the empty ones untouched

  • Best score: 15
  • Best player score: 15
  • Position: #36 / 87
  • Number of attempts: 6
CaN yOuR ViM dO ThAt? #1 - 256 entries

Tsoding's famous "Can your Vim do that?" https://youtu.be/Bafo3hhheHU?si=DfcT4sUEMTSAevnx&t=1091

  • Best score: 41
  • Best player score: 41
  • Position: #21 / 100
  • Number of attempts: 2
Move list of uuids into a SQL query - 227 entries

Take the list of UUIDs and use them as a filter in the where statement of a SQL query

  • Best score: 57
  • Best player score: 61
  • Position: #14 / 73
  • Number of attempts: 5
Markdown Blog Editing - 456 entries

Convert the given link text in start file to a markdown link list.

  • Best score: 30
  • Best player score: 38
  • Position: #33 / 107
  • Number of attempts: 3
Search different SQL column with similar where clause - 322 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: #17 / 74
  • Number of attempts: 6
Move to corresponding lines - 307 entries

Move the values to the corresponding lines.

  • Best score: 16
  • Best player score: 18
  • Position: #19 / 69
  • Number of attempts: 6
Count words - 112 entries

Merge duplicates and count each word.

  • Best score: 39
  • Best player score: 50
  • Position: #10 / 25
  • Number of attempts: 5
Mirror image - 125 entries

Add the second eye

  • Best score: 15
  • Best player score: 21
  • Position: #17 / 36
  • Number of attempts: 2
New teacher - 1465 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 23
  • Position: #98 / 306
  • Number of attempts: 6
Replace word while reserving first letter case - 663 entries

Window -> Door window -> door Windows -> Windows windows -> windows

  • Best score: 24
  • Best player score: 24
  • Position: #29 / 126
  • Number of attempts: 4
months to html list items - 1130 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 24
  • Position: #107 / 306
  • Number of attempts: 3
Quicksort - 2095 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 6
  • Position: #140 / 465
  • Number of attempts: 4
EDN reformat - 1209 entries

The goal is to make the code more readable and concise while maintaining its functionality.

  • Best score: 17
  • Best player score: 18
  • Position: #82 / 170
  • Number of attempts: 14
Remove line numbers - 778 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 8
  • Best player score: 12
  • Position: #84 / 205
  • Number of attempts: 5
Find fix point of cos - 1468 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 15
  • Position: #268 / 431
  • Number of attempts: 1
Paste a column after a column - 2662 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 14
  • Best player score: 16
  • Position: #201 / 576
  • Number of attempts: 5
Tabbed Table to Python Array - 769 entries

Not payed by the hour? So make it fast ;-) The table contains the relative occurencies of bigrams (two consecutive letters) in 1/100,000 in the german language, copy-pasted from http://www.mathe.tu-freiberg.de/~hebisch/cafe/kryptographie/bigramme.html

  • Best score: 50
  • Best player score: 54
  • Position: #50 / 184
  • Number of attempts: 3
HS exam question - 1610 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 59
  • Position: #120 / 420
  • Number of attempts: 3
Many duplicates - 1472 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #324 / 480
  • Number of attempts: 1
delete swap - 1834 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #390 / 570
  • Number of attempts: 1
Generate a very basic Python constructor (fixed) - 1294 entries

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

  • Best score: 29
  • Best player score: 36
  • Position: #89 / 277
  • Number of attempts: 4
Fix the shell script! - 2663 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 30
  • Position: #254 / 619
  • Number of attempts: 3
Visual block training - 1116 entries

You see the input. You see the output. Go.

  • Best score: 17
  • Best player score: 18
  • Position: #45 / 208
  • Number of attempts: 7
Put a newline after every 10 lines in vim - 1680 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #211 / 564
  • Number of attempts: 3
Wikitext headings to markdown - 1029 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #52 / 213
  • Number of attempts: 11
hello-world-vimgolf - 2523 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #346 / 722
  • Number of attempts: 1
Contribute to keyboard mashing - 903 entries

Speak in tongues

  • Best score: 17
  • Best player score: 20
  • Position: #212 / 274
  • Number of attempts: 2
Plotting some variables in python - 1683 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: #129 / 352
  • Number of attempts: 2
Enumerate Bullets - 337 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: 18
  • Best player score: 24
  • Position: #53 / 91
  • Number of attempts: 3
swap number pairs - 2168 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 19
  • Position: #144 / 392
  • Number of attempts: 6
Hogwarts Email Sorting - 948 entries

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

  • Best score: 20
  • Best player score: 22
  • Position: #181 / 268
  • Number of attempts: 3
Add text at some column - 178 entries

Complete golang struct statement.

  • Best score: 31
  • Best player score: 34
  • Position: #55 / 67
  • Number of attempts: 1
prepend * to every non-blank line - 6380 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #769 / 1557
  • Number of attempts: 3
One number per line - 18840 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #776 / 3893
  • Number of attempts: 4
SCREAMING_SNAKE_CASE to Title Case - 1269 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: 27
  • Position: #149 / 264
  • Number of attempts: 3
Remember FizzBuzz? - 787 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 50
  • Position: #59 / 204
  • Number of attempts: 4
yaskur0
Github:

entered into 46 challenges

contributed 0 challenges