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

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

589 active golfers, 2544 entries

Solutions by @nickandbro:
26
#60 - nickGPT / @nickandbro

08/27/2024 at 04:48AM

27
#>124 - nickGPT / @nickandbro

08/27/2024 at 04:48AM

28
#>175 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

29
#>219 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

30
#>241 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

31
#>271 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

32
#>282 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

33
#>294 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

34
#>309 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

35
#>340 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

36
#>358 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

37
#>366 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

38
#>378 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

39
#>387 - nickGPT / @nickandbro

08/27/2024 at 04:47AM

40
#>400 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

41
#>411 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

42
#>424 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

43
#>434 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

44
#>443 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

45
#>452 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

46
#>461 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

47
#>468 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

48
#>477 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

49
#>478 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

50
#>486 - nickGPT / @nickandbro

08/27/2024 at 04:46AM

51
#>492 - nickGPT / @nickandbro

08/27/2024 at 04:45AM

52
#>497 - nickGPT / @nickandbro

08/27/2024 at 04:45AM

53
#>502 - nickGPT / @nickandbro

08/27/2024 at 04:45AM

54
#>506 - nickGPT / @nickandbro

08/27/2024 at 04:45AM

55
#>509 - nickGPT / @nickandbro

08/27/2024 at 04:45AM

56
#>511 - nickGPT / @nickandbro

08/27/2024 at 04:45AM

56
#>511 - nickGPT / @nickandbro

08/27/2024 at 04:45AM

57
#>516 - nickGPT / @nickandbro

08/27/2024 at 04:45AM

58
#>520 - nickGPT / @nickandbro

08/27/2024 at 04:45AM

60
#>521 - nickGPT / @nickandbro

08/27/2024 at 04:45AM

61
#>524 - nickGPT / @nickandbro

08/27/2024 at 04:44AM

62
#>528 - nickGPT / @nickandbro

08/27/2024 at 04:44AM

63
#>530 - nickGPT / @nickandbro

08/27/2024 at 04:44AM

64
#>531 - nickGPT / @nickandbro

08/27/2024 at 04:44AM

65
#>536 - nickGPT / @nickandbro

08/27/2024 at 04:44AM

66
#>539 - nickGPT / @nickandbro

08/27/2024 at 04:42AM

70
#>545 - nickGPT / @nickandbro

08/27/2024 at 04:42AM

71
#>548 - nickGPT / @nickandbro

08/27/2024 at 04:41AM

72
#>550 - nickGPT / @nickandbro

08/27/2024 at 04:41AM

73
#>552 - nickGPT / @nickandbro

08/27/2024 at 04:41AM

74
#>553 - nickGPT / @nickandbro

08/27/2024 at 04:41AM

75
#>555 - nickGPT / @nickandbro

08/27/2024 at 04:41AM

78
#>556 - nickGPT / @nickandbro

08/27/2024 at 04:41AM

83
#>558 - nickGPT / @nickandbro

08/27/2024 at 04:41AM

84
#>560 - nickGPT / @nickandbro

08/27/2024 at 04:41AM

87
#>561 - nickGPT / @nickandbro

08/27/2024 at 04:41AM

89
#>564 - nickGPT / @nickandbro

08/27/2024 at 04:41AM