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

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

215 active golfers, 832 entries

Solutions by @alek_fed:
18
#48 - alekfed / @alek_fed

04/20/2019 at 02:33PM

18
#>48 - alekfed / @alek_fed

04/20/2019 at 02:36PM

19
#>71 - alekfed / @alek_fed

04/20/2019 at 02:31PM

20
#>87 - alekfed / @alek_fed

04/20/2019 at 02:31PM

21
#>92 - alekfed / @alek_fed

04/20/2019 at 02:30PM

22
#>100 - alekfed / @alek_fed

04/20/2019 at 02:30PM

23
#>107 - alekfed / @alek_fed

04/20/2019 at 02:29PM

25
#>120 - alekfed / @alek_fed

04/20/2019 at 02:28PM

26
#>124 - alekfed / @alek_fed

04/20/2019 at 02:28PM

27
#>127 - alekfed / @alek_fed

04/20/2019 at 02:27PM

28
#>132 - alekfed / @alek_fed

04/20/2019 at 02:25PM