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

549 active golfers, 2372 entries

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

04/01/2022 at 03:35PM

34
#>282 - 盧小小 / @VegetaLu

04/01/2022 at 03:32PM

35
#>298 - 盧小小 / @VegetaLu

04/01/2022 at 03:29PM

37
#>341 - 盧小小 / @VegetaLu

04/01/2022 at 03:25PM

38
#>349 - 盧小小 / @VegetaLu

04/01/2022 at 03:28PM

43
#>398 - 盧小小 / @VegetaLu

04/01/2022 at 03:16PM

44
#>405 - 盧小小 / @VegetaLu

04/01/2022 at 03:10PM

45
#>414 - 盧小小 / @VegetaLu

04/01/2022 at 03:19PM

46
#>424 - 盧小小 / @VegetaLu

04/01/2022 at 03:03PM

46
#>424 - 盧小小 / @VegetaLu

04/01/2022 at 03:06PM

51
#>452 - 盧小小 / @VegetaLu

04/01/2022 at 03:00PM

52
#>458 - 盧小小 / @VegetaLu

04/01/2022 at 02:53PM

54
#>468 - 盧小小 / @VegetaLu

04/01/2022 at 03:02PM

57
#>477 - 盧小小 / @VegetaLu

04/01/2022 at 02:59PM

57
#>477 - 盧小小 / @VegetaLu

04/01/2022 at 03:27PM

61
#>486 - 盧小小 / @VegetaLu

04/01/2022 at 02:58PM

117
#>535 - 盧小小 / @VegetaLu

04/01/2022 at 03:23PM