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 9v006233d72d000000000219

Fix the shell script!

Fix the shell script with the fewest keystrokes!

Start file
#!/bin/bash
a = 5
b = 10
sum = $a + $b
echo $sum

mul = $a * $b
echo $mul
End file
#!/bin/bash
a=5
b=10
sum=$((a + b))
echo $sum

mul=$((a * b))
echo $mul

View Diff

2,4c2,4
< a = 5
< b = 10
< sum = $a + $b
---
> a=5
> b=10
> sum=$((a + b))
7c7
< mul = $a * $b
---
> mul=$((a * b))

Solutions by @BigWangTheory1:

Unlock 20 remaining solutions by signing in and submitting your own entry
Created by: @u_hossein

540 active golfers, 2338 entries

Solutions by @BigWangTheory1:
26
#42 - David W. / @BigWangTheory1

12/03/2022 at 07:11PM

27
#>94 - David W. / @BigWangTheory1

12/03/2022 at 07:03PM

28
#>140 - David W. / @BigWangTheory1

12/03/2022 at 06:57PM

28
#>140 - David W. / @BigWangTheory1

12/03/2022 at 07:02PM

29
#>187 - David W. / @BigWangTheory1

12/03/2022 at 06:05PM

30
#>223 - David W. / @BigWangTheory1

12/03/2022 at 06:03PM

30
#>223 - David W. / @BigWangTheory1

12/03/2022 at 06:04PM

31
#>253 - David W. / @BigWangTheory1

12/03/2022 at 06:01PM

33
#>275 - David W. / @BigWangTheory1

12/03/2022 at 05:47AM

40
#>367 - David W. / @BigWangTheory1

12/03/2022 at 05:45AM

43
#>395 - David W. / @BigWangTheory1

12/03/2022 at 05:42AM

44
#>405 - David W. / @BigWangTheory1

12/03/2022 at 05:39AM

45
#>411 - David W. / @BigWangTheory1

12/03/2022 at 05:30AM

46
#>421 - David W. / @BigWangTheory1

12/03/2022 at 05:26AM

50
#>445 - David W. / @BigWangTheory1

12/03/2022 at 05:21AM

57
#>472 - David W. / @BigWangTheory1

12/03/2022 at 05:14AM

62
#>485 - David W. / @BigWangTheory1

12/03/2022 at 04:55AM

64
#>488 - David W. / @BigWangTheory1

12/03/2022 at 05:09AM

78
#>509 - David W. / @BigWangTheory1

12/03/2022 at 04:51AM

80
#>510 - David W. / @BigWangTheory1

12/03/2022 at 05:01AM