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 - 1385 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: #258 / 406
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 546 entries

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

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

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

  • Best score: 14
  • Best player score: 16
  • Position: #131 / 549
  • Number of attempts: 6
Filter number combinations that don't add to 11 - 401 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: #90 / 114
  • Number of attempts: 2
HS exam question - 1578 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 49
  • Position: #53 / 416
  • Number of attempts: 12
Reformat symbols in list - 1607 entries

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

  • Best score: 24
  • Best player score: 38
  • Position: #256 / 345
  • Number of attempts: 3
Fizzbuzz - 557 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 89
  • Position: #116 / 166
  • Number of attempts: 1
Changing around text with citations - 329 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 43
  • Position: #64 / 93
  • Number of attempts: 1
Many duplicates - 1443 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #209 / 467
  • Number of attempts: 4
delete swap - 1773 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #248 / 549
  • Number of attempts: 7
Generate a very basic Python constructor (fixed) - 1253 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: #100 / 271
  • Number of attempts: 9
Put a newline after every 10 lines in vim - 1657 entries

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

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

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #37 / 209
  • Number of attempts: 9
Plotting some variables in python - 1660 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: #137 / 347
  • Number of attempts: 3
Inverting Lines - 1892 entries

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

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

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 47
  • Position: #209 / 319
  • Number of attempts: 1
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: 19
  • Position: #60 / 249
  • 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 - 2037 entries

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

  • Best score: 24
  • Best player score: 25
  • Position: #50 / 501
  • Number of attempts: 7
switch variable - 5071 entries

how fast can you switch two variable ?

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

entered into 21 challenges

contributed 0 challenges