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 5078889ceedfc90002000047

Python to Ruby

Convert this Python code to Ruby. NOTE: This program likely won't run.

Start file
class PythonToRuby:
  def add(x, y):
    x + y

  n = add(1 + 1)
End file
class PythonToRuby
	def add(x, y)
		x + y
	end

	n = add(1, 2)
end

View Diff

1,3c1,4
< class PythonToRuby:
<   def add(x, y):
<     x + y
---
> class PythonToRuby
> 	def add(x, y)
> 		x + y
> 	end
5c6,7
<   n = add(1 + 1)
---
> 	n = add(1, 2)
> end

Solutions by @GavinKoeng:

Unlock 10 remaining solutions by signing in and submitting your own entry
Created by: @dynamic_library

62 active golfers, 214 entries

Solutions by @GavinKoeng:
24
#3 - Gavin / @GavinKoeng

06/16/2026 at 02:12AM

25
#>13 - Gavin / @GavinKoeng

06/16/2026 at 01:27AM

26
#>13 - Gavin / @GavinKoeng

06/16/2026 at 02:09AM

27
#>28 - Gavin / @GavinKoeng

06/16/2026 at 01:26AM

28
#>31 - Gavin / @GavinKoeng

06/16/2026 at 01:25AM

33
#>35 - Gavin / @GavinKoeng

06/16/2026 at 01:24AM

35
#>36 - Gavin / @GavinKoeng

06/16/2026 at 01:21AM

41
#>47 - Gavin / @GavinKoeng

06/16/2026 at 01:20AM

42
#>49 - Gavin / @GavinKoeng

06/16/2026 at 01:19AM

69
#>62 - Gavin / @GavinKoeng

06/16/2026 at 01:18AM