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

Find fix point of cos - 1426 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: 16
  • Position: #267 / 422
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 567 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 17
  • Position: #55 / 318
  • Number of attempts: 2
Paste a column after a column - 2604 entries

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

  • Best score: 14
  • Best player score: 16
  • Position: #137 / 565
  • Number of attempts: 6
Filter number combinations that don't add to 11 - 415 entries

Append the sum of each line to its end, alongside an equals sign, and remove any that do not sum to 11. The ordering of lines should stay the same. Note that the combinations are semi-arbitrary and not all 4-number combinations are present in the file.

  • Best score: 27
  • Best player score: 30
  • Position: #94 / 119
  • Number of attempts: 2
HS exam question - 1596 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 49
  • Position: #55 / 418
  • Number of attempts: 12
Reformat symbols in list - 1633 entries

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

  • Best score: 24
  • Best player score: 38
  • Position: #261 / 351
  • Number of attempts: 3
Fizzbuzz - 586 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 44
  • Best player score: 89
  • Position: #119 / 169
  • Number of attempts: 1
Changing around text with citations - 340 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 43
  • Position: #65 / 94
  • Number of attempts: 1
Many duplicates - 1459 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #211 / 476
  • Number of attempts: 4
delete swap - 1801 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #248 / 561
  • Number of attempts: 7
Generate a very basic Python constructor (fixed) - 1264 entries

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

  • Best score: 29
  • Best player score: 38
  • Position: #101 / 272
  • Number of attempts: 9
Put a newline after every 10 lines in vim - 1664 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #167 / 559
  • Number of attempts: 5
Wikitext headings to markdown - 1003 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #37 / 210
  • Number of attempts: 9
Plotting some variables in python - 1671 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: 41
  • Position: #138 / 349
  • Number of attempts: 3
Inverting Lines - 1923 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 11
  • Position: #261 / 516
  • Number of attempts: 5
Making 3 line function a one liner. - 340 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #149 / 209
  • Number of attempts: 1
Modernise code - 1410 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 47
  • Position: #214 / 326
  • Number of attempts: 1
SCREAMING_SNAKE_CASE to Title Case - 1240 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: 19
  • Position: #60 / 257
  • Number of attempts: 6
Triangle of arrows - 199 entries

I made this by accident when working on another challenge. How would you go about making this?

  • Best score: 14
  • Best player score: 22
  • Position: #27 / 44
  • Number of attempts: 5
Line under headers - 2072 entries

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

  • Best score: 24
  • Best player score: 25
  • Position: #51 / 510
  • Number of attempts: 7
switch variable - 5085 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #663 / 1750
  • Number of attempts: 4
b1gz
Twitter:

entered into 21 challenges

contributed 0 challenges