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 5e319945224f4100097c9609

Aliases for cd

Create these beautiful aliases with as few strokes as possible. Are you up for the challenge?

Start file
alias c.='cd ..'
End file
alias c.='cd ..'
alias c..='cd ../..'
alias c...='cd ../../..'
alias c....='cd ../../../..'
alias c.....='cd ../../../../..'

alias c1='cd ..'
alias c2='cd ../..'
alias c3='cd ../../..'
alias c4='cd ../../../..'
alias c5='cd ../../../../..'

View Diff

1a2,11
> alias c..='cd ../..'
> alias c...='cd ../../..'
> alias c....='cd ../../../..'
> alias c.....='cd ../../../../..'
> 
> alias c1='cd ..'
> alias c2='cd ../..'
> alias c3='cd ../../..'
> alias c4='cd ../../../..'
> alias c5='cd ../../../../..'

Solutions by @colega:

Unlock 16 remaining solutions by signing in and submitting your own entry
Created by: @rax0m

129 active golfers, 674 entries

Solutions by @colega:
30
#6 - Oleg / @colega

03/21/2020 at 08:00PM

31
#>16 - Oleg / @colega

03/21/2020 at 07:57PM

33
#>24 - Oleg / @colega

03/21/2020 at 07:55PM

34
#>32 - Oleg / @colega

03/21/2020 at 07:47PM

35
#>35 - Oleg / @colega

03/21/2020 at 07:41PM

37
#>37 - Oleg / @colega

03/21/2020 at 07:33PM

39
#>45 - Oleg / @colega

03/21/2020 at 07:28PM

41
#>47 - Oleg / @colega

03/21/2020 at 07:24PM

44
#>52 - Oleg / @colega

03/21/2020 at 07:20PM

45
#>54 - Oleg / @colega

03/21/2020 at 07:09PM

45
#>54 - Oleg / @colega

03/21/2020 at 07:16PM

46
#>61 - Oleg / @colega

03/21/2020 at 04:03PM

49
#>78 - Oleg / @colega

03/21/2020 at 03:48PM

51
#>81 - Oleg / @colega

03/20/2020 at 09:37PM

65
#>104 - Oleg / @colega

03/20/2020 at 09:21PM

74
#>110 - Oleg / @colega

03/20/2020 at 08:59PM