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

589 active golfers, 2544 entries

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

12/03/2022 at 07:11PM

27
#>97 - David W. / @BigWangTheory1

12/03/2022 at 07:03PM

28
#>148 - David W. / @BigWangTheory1

12/03/2022 at 06:57PM

28
#>148 - David W. / @BigWangTheory1

12/03/2022 at 07:02PM

29
#>196 - David W. / @BigWangTheory1

12/03/2022 at 06:05PM

30
#>232 - David W. / @BigWangTheory1

12/03/2022 at 06:03PM

30
#>232 - David W. / @BigWangTheory1

12/03/2022 at 06:04PM

31
#>265 - David W. / @BigWangTheory1

12/03/2022 at 06:01PM

33
#>289 - David W. / @BigWangTheory1

12/03/2022 at 05:47AM

40
#>391 - David W. / @BigWangTheory1

12/03/2022 at 05:45AM

43
#>430 - David W. / @BigWangTheory1

12/03/2022 at 05:42AM

44
#>440 - David W. / @BigWangTheory1

12/03/2022 at 05:39AM

45
#>446 - David W. / @BigWangTheory1

12/03/2022 at 05:30AM

46
#>457 - David W. / @BigWangTheory1

12/03/2022 at 05:26AM

50
#>485 - David W. / @BigWangTheory1

12/03/2022 at 05:21AM

57
#>513 - David W. / @BigWangTheory1

12/03/2022 at 05:14AM

62
#>527 - David W. / @BigWangTheory1

12/03/2022 at 04:55AM

64
#>531 - David W. / @BigWangTheory1

12/03/2022 at 05:09AM

78
#>556 - David W. / @BigWangTheory1

12/03/2022 at 04:51AM

80
#>557 - David W. / @BigWangTheory1

12/03/2022 at 05:01AM