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

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

215 active golfers, 832 entries

Solutions by @AkeyCoy:
18
#58 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:47PM

19
#>74 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:46PM

20
#>87 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:45PM

21
#>93 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:44PM

22
#>101 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:43PM

24
#>113 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:40PM

25
#>120 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:33PM

25
#>120 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:39PM

26
#>124 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:29PM

27
#>127 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:28PM

28
#>132 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:26PM

29
#>150 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:24PM

30
#>168 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:14PM

33
#>188 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:13PM

45
#>201 - 刘宏亮 / @AkeyCoy

09/24/2022 at 04:06PM