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 4d2c9d06eda6262e4e00007a

Assignment Alignment

line up the operators. Use spaces, not tabs.

Start file
# Align these assignments

x = 1
y = true
z = 'you'
foo = 'bar'
long_name = "long variable value"
$p3cial = ch4rs
last = line

# Much better!
End file
# Align these assignments

x         = 1
y         = true
z         = 'you'
foo       = 'bar'
long_name = "long variable value"
$p3cial   = ch4rs
last      = line

# Much better!

View Diff

3,6c3,6
< x = 1
< y = true
< z = 'you'
< foo = 'bar'
---
> x         = 1
> y         = true
> z         = 'you'
> foo       = 'bar'
8,9c8,9
< $p3cial = ch4rs
< last = line
---
> $p3cial   = ch4rs
> last      = line

Solutions by @yslinnctu:

Unlock 11 remaining solutions by signing in and submitting your own entry
Created by: @khamer

215 active golfers, 829 entries

Solutions by @yslinnctu:
18
#21 - You-Siang Lin / @yslinnctu

12/01/2011 at 03:16AM

19
#>61 - You-Siang Lin / @yslinnctu

12/01/2011 at 03:14AM

20
#>82 - You-Siang Lin / @yslinnctu

12/01/2011 at 03:13AM

22
#>99 - You-Siang Lin / @yslinnctu

12/01/2011 at 03:12AM

23
#>103 - You-Siang Lin / @yslinnctu

12/01/2011 at 03:09AM

25
#>114 - You-Siang Lin / @yslinnctu

12/01/2011 at 02:58AM

29
#>145 - You-Siang Lin / @yslinnctu

12/01/2011 at 02:57AM

30
#>159 - You-Siang Lin / @yslinnctu

12/01/2011 at 02:56AM

31
#>175 - You-Siang Lin / @yslinnctu

12/01/2011 at 02:53AM

32
#>186 - You-Siang Lin / @yslinnctu

12/01/2011 at 02:52AM

40
#>198 - You-Siang Lin / @yslinnctu

12/01/2011 at 02:50AM