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

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

221 active golfers, 885 entries

Solutions by @__Coos:
18
#57 - Janzen / @__Coos

09/23/2022 at 07:54AM

19
#>76 - Janzen / @__Coos

09/23/2022 at 07:53AM

20
#>89 - Janzen / @__Coos

09/23/2022 at 07:53AM

21
#>95 - Janzen / @__Coos

09/23/2022 at 07:51AM

22
#>103 - Janzen / @__Coos

09/23/2022 at 07:50AM

23
#>109 - Janzen / @__Coos

09/23/2022 at 07:21AM

23
#>109 - Janzen / @__Coos

09/23/2022 at 07:49AM

24
#>115 - Janzen / @__Coos

09/23/2022 at 07:19AM

25
#>123 - Janzen / @__Coos

09/23/2022 at 07:18AM

26
#>127 - Janzen / @__Coos

09/23/2022 at 06:44AM