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

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

223 active golfers, 897 entries

Solutions by @scottrick49:
24
#116 - Scott Atkins / @scottrick49

08/05/2021 at 01:41PM

25
#>124 - Scott Atkins / @scottrick49

08/05/2021 at 01:41PM

26
#>128 - Scott Atkins / @scottrick49

08/05/2021 at 01:40PM

26
#>128 - Scott Atkins / @scottrick49

08/05/2021 at 01:41PM

27
#>131 - Scott Atkins / @scottrick49

08/05/2021 at 01:39PM

28
#>136 - Scott Atkins / @scottrick49

08/05/2021 at 01:38PM

29
#>155 - Scott Atkins / @scottrick49

08/05/2021 at 01:38PM

30
#>172 - Scott Atkins / @scottrick49

08/05/2021 at 01:38PM

31
#>190 - Scott Atkins / @scottrick49

08/05/2021 at 01:37PM

36
#>203 - Scott Atkins / @scottrick49

08/05/2021 at 01:35PM

37
#>203 - Scott Atkins / @scottrick49

08/05/2021 at 01:34PM

39
#>205 - Scott Atkins / @scottrick49

08/05/2021 at 01:33PM

41
#>206 - Scott Atkins / @scottrick49

08/05/2021 at 01:29PM

42
#>206 - Scott Atkins / @scottrick49

08/05/2021 at 01:27PM

44
#>208 - Scott Atkins / @scottrick49

08/05/2021 at 01:28PM

61
#>221 - Scott Atkins / @scottrick49

08/05/2021 at 01:25PM