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

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

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

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

  • Best score: 14
  • Best player score: 16
  • Position: #130 / 538
  • Number of attempts: 6
Filter number combinations that don't add to 11 - 398 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: #89 / 113
  • Number of attempts: 2
HS exam question - 1560 entries

Convert the data to a python dictionary

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

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

  • Best score: 24
  • Best player score: 38
  • Position: #251 / 339
  • 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 - 327 entries

Based off of something I saw on reddit

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

Quick and easy

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

delete all swap

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

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

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

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #37 / 208
  • 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 - 1879 entries

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

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

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 47
  • Position: #208 / 318
  • Number of attempts: 1
SCREAMING_SNAKE_CASE to Title Case - 1213 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 / 248
  • 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 - 2028 entries

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

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

how fast can you switch two variable ?

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

entered into 21 challenges

contributed 0 challenges