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

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

223 active golfers, 897 entries

Solutions by @z00master:
19
#76 - z00master / @z00master

08/29/2022 at 04:28PM

20
#>90 - z00master / @z00master

08/29/2022 at 04:28PM

21
#>96 - z00master / @z00master

08/29/2022 at 04:27PM

22
#>104 - z00master / @z00master

08/29/2022 at 04:27PM

23
#>110 - z00master / @z00master

08/29/2022 at 04:26PM

24
#>116 - z00master / @z00master

08/29/2022 at 04:26PM

25
#>124 - z00master / @z00master

08/29/2022 at 04:25PM

26
#>128 - z00master / @z00master

08/29/2022 at 04:25PM

27
#>131 - z00master / @z00master

08/29/2022 at 04:25PM

28
#>136 - z00master / @z00master

08/29/2022 at 04:24PM

29
#>155 - z00master / @z00master

08/29/2022 at 04:24PM

30
#>173 - z00master / @z00master

08/29/2022 at 04:23PM

31
#>190 - z00master / @z00master

08/29/2022 at 04:23PM

36
#>203 - z00master / @z00master

08/29/2022 at 04:22PM

38
#>204 - z00master / @z00master

08/29/2022 at 04:20PM

39
#>205 - z00master / @z00master

08/29/2022 at 04:19PM