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

607 active golfers, 2606 entries

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

04/01/2022 at 03:35PM

34
#>301 - 盧小小 / @VegetaLu

04/01/2022 at 03:32PM

35
#>319 - 盧小小 / @VegetaLu

04/01/2022 at 03:29PM

37
#>366 - 盧小小 / @VegetaLu

04/01/2022 at 03:25PM

38
#>379 - 盧小小 / @VegetaLu

04/01/2022 at 03:28PM

43
#>442 - 盧小小 / @VegetaLu

04/01/2022 at 03:16PM

44
#>449 - 盧小小 / @VegetaLu

04/01/2022 at 03:10PM

45
#>458 - 盧小小 / @VegetaLu

04/01/2022 at 03:19PM

46
#>469 - 盧小小 / @VegetaLu

04/01/2022 at 03:03PM

46
#>469 - 盧小小 / @VegetaLu

04/01/2022 at 03:06PM

51
#>503 - 盧小小 / @VegetaLu

04/01/2022 at 03:00PM

52
#>509 - 盧小小 / @VegetaLu

04/01/2022 at 02:53PM

54
#>519 - 盧小小 / @VegetaLu

04/01/2022 at 03:02PM

57
#>529 - 盧小小 / @VegetaLu

04/01/2022 at 02:59PM

57
#>529 - 盧小小 / @VegetaLu

04/01/2022 at 03:27PM

61
#>539 - 盧小小 / @VegetaLu

04/01/2022 at 02:58PM

117
#>593 - 盧小小 / @VegetaLu

04/01/2022 at 03:23PM