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

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

220 active golfers, 883 entries

Solutions by @angelchiang:
18
#41 - Angel Chiang / @angelchiang

03/06/2017 at 08:39PM

19
#>72 - Angel Chiang / @angelchiang

03/06/2017 at 08:38PM

20
#>88 - Angel Chiang / @angelchiang

03/06/2017 at 08:36PM

21
#>94 - Angel Chiang / @angelchiang

03/06/2017 at 08:35PM

22
#>102 - Angel Chiang / @angelchiang

03/06/2017 at 08:34PM

23
#>109 - Angel Chiang / @angelchiang

03/06/2017 at 08:32PM

24
#>114 - Angel Chiang / @angelchiang

03/06/2017 at 08:31PM

28
#>135 - Angel Chiang / @angelchiang

03/06/2017 at 08:28PM

29
#>153 - Angel Chiang / @angelchiang

03/06/2017 at 08:25PM

30
#>170 - Angel Chiang / @angelchiang

03/06/2017 at 08:23PM

31
#>187 - Angel Chiang / @angelchiang

03/06/2017 at 08:22PM