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

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

146 active golfers, 819 entries

Solutions by @ho_wan_:
33
#30 - howanto / @ho_wan_

02/16/2020 at 10:44PM

33
#>30 - howanto / @ho_wan_

02/16/2020 at 10:46PM

33
#>30 - howanto / @ho_wan_

02/16/2020 at 10:54PM

34
#>37 - howanto / @ho_wan_

02/16/2020 at 10:40PM

38
#>48 - howanto / @ho_wan_

02/16/2020 at 10:15PM

38
#>48 - howanto / @ho_wan_

02/16/2020 at 10:34PM

39
#>53 - howanto / @ho_wan_

02/16/2020 at 10:09PM

41
#>57 - howanto / @ho_wan_

02/16/2020 at 10:06PM

42
#>59 - howanto / @ho_wan_

02/16/2020 at 10:04PM

44
#>63 - howanto / @ho_wan_

02/16/2020 at 10:01PM

47
#>85 - howanto / @ho_wan_

02/16/2020 at 09:52PM

56
#>105 - howanto / @ho_wan_

02/16/2020 at 09:48PM

59
#>115 - howanto / @ho_wan_

02/16/2020 at 09:33PM

60
#>117 - howanto / @ho_wan_

02/16/2020 at 09:30PM

98
#>136 - howanto / @ho_wan_

02/16/2020 at 09:26PM