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 @Cam_Peterson:

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

59 active golfers, 196 entries

Solutions by @Cam_Peterson:
38
#42 - Cam Peterson / @Cam_Peterson

05/02/2013 at 05:56AM

38
#>42 - Cam Peterson / @Cam_Peterson

05/02/2013 at 06:01AM

40
#>43 - Cam Peterson / @Cam_Peterson

05/02/2013 at 05:51AM

42
#>46 - Cam Peterson / @Cam_Peterson

05/02/2013 at 05:50AM

43
#>48 - Cam Peterson / @Cam_Peterson

05/02/2013 at 05:44AM

46
#>51 - Cam Peterson / @Cam_Peterson

05/02/2013 at 05:43AM

51
#>54 - Cam Peterson / @Cam_Peterson

05/02/2013 at 05:26AM

51
#>54 - Cam Peterson / @Cam_Peterson

05/02/2013 at 05:39AM

55
#>56 - Cam Peterson / @Cam_Peterson

05/02/2013 at 05:25AM