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

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

221 active golfers, 885 entries

Solutions by @po6ix:
18
#53 - POSIX / @po6ix

01/10/2022 at 03:06PM

19
#>75 - POSIX / @po6ix

01/10/2022 at 03:06PM

20
#>89 - POSIX / @po6ix

01/10/2022 at 03:05PM

22
#>103 - POSIX / @po6ix

01/10/2022 at 03:04PM

23
#>109 - POSIX / @po6ix

01/10/2022 at 03:04PM

24
#>115 - POSIX / @po6ix

01/10/2022 at 03:03PM

25
#>123 - POSIX / @po6ix

01/10/2022 at 03:02PM

26
#>127 - POSIX / @po6ix

01/10/2022 at 03:01PM

27
#>130 - POSIX / @po6ix

01/10/2022 at 03:01PM

28
#>135 - POSIX / @po6ix

01/10/2022 at 03:00PM

29
#>153 - POSIX / @po6ix

01/10/2022 at 02:59PM

50
#>210 - POSIX / @po6ix

01/10/2022 at 02:56PM