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

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

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

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

  • Best score: 14
  • Best player score: 16
  • Position: #110 / 453
  • Number of attempts: 6
Filter number combinations that don't add to 11 - 346 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: #83 / 103
  • Number of attempts: 2
HS exam question - 1420 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 49
  • Position: #48 / 382
  • Number of attempts: 12
Reformat symbols in list - 1417 entries

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

  • Best score: 24
  • Best player score: 38
  • Position: #232 / 312
  • Number of attempts: 3
Fizzbuzz - 486 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 47
  • Best player score: 89
  • Position: #107 / 152
  • Number of attempts: 1
Changing around text with citations - 302 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 43
  • Position: #60 / 85
  • Number of attempts: 1
Many duplicates - 1189 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #202 / 387
  • Number of attempts: 4
delete swap - 1454 entries

delete all swap

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

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

  • Best score: 10
  • Best player score: 11
  • Position: #162 / 517
  • Number of attempts: 5
Wikitext headings to markdown - 946 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #37 / 197
  • Number of attempts: 9
Plotting some variables in python - 1539 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: #131 / 327
  • Number of attempts: 3
Inverting Lines - 1774 entries

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

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

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 47
  • Position: #198 / 303
  • Number of attempts: 1
SCREAMING_SNAKE_CASE to Title Case - 1169 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 / 242
  • Number of attempts: 6
Triangle of arrows - 166 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: #24 / 39
  • Number of attempts: 5
Line under headers - 1987 entries

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

  • Best score: 24
  • Best player score: 25
  • Position: #46 / 493
  • Number of attempts: 7
switch variable - 5026 entries

how fast can you switch two variable ?

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

entered into 21 challenges

contributed 0 challenges