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

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

220 active golfers, 883 entries

Solutions by @dstein64:
18
#49 - Dan / @dstein64

05/02/2019 at 07:10PM

19
#>73 - Dan / @dstein64

05/02/2019 at 07:09PM

20
#>89 - Dan / @dstein64

05/02/2019 at 07:08PM

21
#>94 - Dan / @dstein64

05/02/2019 at 06:24PM

22
#>102 - Dan / @dstein64

04/30/2019 at 03:09AM

23
#>109 - Dan / @dstein64

04/30/2019 at 03:07AM

24
#>114 - Dan / @dstein64

04/30/2019 at 03:06AM

28
#>135 - Dan / @dstein64

04/30/2019 at 03:04AM

29
#>153 - Dan / @dstein64

04/30/2019 at 02:46AM

29
#>153 - Dan / @dstein64

04/30/2019 at 02:49AM

30
#>170 - Dan / @dstein64

04/30/2019 at 02:45AM