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

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

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

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

  • Best score: 14
  • Best player score: 16
  • Position: #127 / 523
  • Number of attempts: 6
Filter number combinations that don't add to 11 - 379 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: #88 / 112
  • Number of attempts: 2
HS exam question - 1523 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 49
  • Position: #51 / 404
  • Number of attempts: 12
Reformat symbols in list - 1507 entries

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

  • Best score: 24
  • Best player score: 38
  • Position: #246 / 334
  • Number of attempts: 3
Fizzbuzz - 539 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 89
  • Position: #114 / 162
  • Number of attempts: 1
Changing around text with citations - 324 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 43
  • Position: #63 / 90
  • Number of attempts: 1
Many duplicates - 1350 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #207 / 440
  • Number of attempts: 4
delete swap - 1650 entries

delete all swap

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

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

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

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #37 / 207
  • Number of attempts: 9
Plotting some variables in python - 1605 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: #136 / 345
  • Number of attempts: 3
Inverting Lines - 1870 entries

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

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

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 47
  • Position: #207 / 316
  • Number of attempts: 1
SCREAMING_SNAKE_CASE to Title Case - 1203 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 / 247
  • Number of attempts: 6
Triangle of arrows - 181 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: #26 / 43
  • Number of attempts: 5
Line under headers - 2023 entries

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

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

how fast can you switch two variable ?

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

entered into 21 challenges

contributed 0 challenges