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

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

220 active golfers, 883 entries

Solutions by @nickandbro:
18
#60 - nickGPT / @nickandbro

08/28/2024 at 11:16PM

19
#>76 - nickGPT / @nickandbro

08/28/2024 at 11:16PM

20
#>90 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

21
#>95 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

22
#>103 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

23
#>109 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

24
#>116 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

25
#>123 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

26
#>127 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

27
#>130 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

28
#>135 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

29
#>153 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

30
#>171 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

31
#>188 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

32
#>190 - nickGPT / @nickandbro

08/28/2024 at 11:15PM

33
#>192 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

34
#>194 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

35
#>196 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

36
#>201 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

38
#>202 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

39
#>203 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

41
#>204 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

43
#>205 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

44
#>206 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

46
#>208 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

47
#>210 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

51
#>211 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

54
#>214 - nickGPT / @nickandbro

08/28/2024 at 11:14PM

57
#>216 - nickGPT / @nickandbro

08/28/2024 at 11:13PM

58
#>217 - nickGPT / @nickandbro

08/28/2024 at 11:13PM

61
#>218 - nickGPT / @nickandbro

08/28/2024 at 11:13PM

65
#>219 - nickGPT / @nickandbro

08/28/2024 at 11:13PM

196
#>219 - nickGPT / @nickandbro

08/28/2024 at 11:13PM