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

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

215 active golfers, 829 entries

Solutions by @pieapple03:
18
#42 - Zhihong Liu / @pieapple03

03/25/2017 at 04:29AM

19
#>70 - Zhihong Liu / @pieapple03

03/25/2017 at 04:28AM

20
#>86 - Zhihong Liu / @pieapple03

03/25/2017 at 04:28AM

22
#>100 - Zhihong Liu / @pieapple03

03/25/2017 at 04:27AM

24
#>112 - Zhihong Liu / @pieapple03

03/25/2017 at 04:26AM

28
#>132 - Zhihong Liu / @pieapple03

03/25/2017 at 04:23AM

29
#>150 - Zhihong Liu / @pieapple03

03/25/2017 at 04:21AM

30
#>167 - Zhihong Liu / @pieapple03

03/25/2017 at 04:18AM

31
#>184 - Zhihong Liu / @pieapple03

03/25/2017 at 04:17AM