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

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

589 active golfers, 2544 entries

Solutions by @VegetaLu:
32
#272 - 盧小小 / @VegetaLu

04/01/2022 at 03:35PM

34
#>294 - 盧小小 / @VegetaLu

04/01/2022 at 03:32PM

35
#>312 - 盧小小 / @VegetaLu

04/01/2022 at 03:29PM

37
#>358 - 盧小小 / @VegetaLu

04/01/2022 at 03:25PM

38
#>367 - 盧小小 / @VegetaLu

04/01/2022 at 03:28PM

43
#>427 - 盧小小 / @VegetaLu

04/01/2022 at 03:16PM

44
#>434 - 盧小小 / @VegetaLu

04/01/2022 at 03:10PM

45
#>443 - 盧小小 / @VegetaLu

04/01/2022 at 03:19PM

46
#>454 - 盧小小 / @VegetaLu

04/01/2022 at 03:03PM

46
#>454 - 盧小小 / @VegetaLu

04/01/2022 at 03:06PM

51
#>486 - 盧小小 / @VegetaLu

04/01/2022 at 03:00PM

52
#>492 - 盧小小 / @VegetaLu

04/01/2022 at 02:53PM

54
#>502 - 盧小小 / @VegetaLu

04/01/2022 at 03:02PM

57
#>511 - 盧小小 / @VegetaLu

04/01/2022 at 02:59PM

57
#>511 - 盧小小 / @VegetaLu

04/01/2022 at 03:27PM

61
#>521 - 盧小小 / @VegetaLu

04/01/2022 at 02:58PM

117
#>575 - 盧小小 / @VegetaLu

04/01/2022 at 03:23PM