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

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

146 active golfers, 819 entries

Solutions by @somemeatjain:
31
#27 - Sammit / @somemeatjain

02/05/2022 at 12:32PM

33
#>32 - Sammit / @somemeatjain

02/05/2022 at 12:28PM

34
#>41 - Sammit / @somemeatjain

02/05/2022 at 12:26PM

35
#>42 - Sammit / @somemeatjain

02/05/2022 at 12:24PM

36
#>44 - Sammit / @somemeatjain

02/05/2022 at 12:23PM

37
#>45 - Sammit / @somemeatjain

02/05/2022 at 12:17PM

38
#>48 - Sammit / @somemeatjain

02/05/2022 at 12:15PM

39
#>54 - Sammit / @somemeatjain

02/05/2022 at 12:11PM

40
#>56 - Sammit / @somemeatjain

02/05/2022 at 12:09PM

41
#>59 - Sammit / @somemeatjain

02/05/2022 at 12:08PM

42
#>59 - Sammit / @somemeatjain

02/05/2022 at 12:06PM

44
#>65 - Sammit / @somemeatjain

02/05/2022 at 12:05PM

45
#>72 - Sammit / @somemeatjain

02/05/2022 at 11:58AM

47
#>87 - Sammit / @somemeatjain

02/05/2022 at 11:42AM

57
#>111 - Sammit / @somemeatjain

02/05/2022 at 11:33AM