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

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

220 active golfers, 883 entries

Solutions by @kawkafi:
19
#63 - Dragan Cvetinovic / @kawkafi

05/02/2011 at 02:47PM

20
#>82 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 08:30PM

22
#>101 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 06:28PM

24
#>112 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 05:51PM

24
#>112 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 09:11PM

25
#>117 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 09:04PM

29
#>144 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 04:49PM

30
#>158 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 04:45PM

30
#>158 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 04:47PM

31
#>177 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 04:43PM

32
#>190 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 03:56PM

32
#>190 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 04:03PM

32
#>190 - Dragan Cvetinovic / @kawkafi

04/29/2011 at 04:07PM