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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 138 remaining solutions by signing in and submitting your own entry
#139 Jack Hawley / @JackHawley - Score: 271 - 01/30/20 @ 03:45
$a<CR>alias c.='<BS><BS>.='cd.<BS> ../..'<CR>alias c...='cd ..'<BS>/../..'<CR>alias c....'<BS><BS>.='cd ../../../..'<CR>alias c <BS>.....='cd ../../../..///<BS><BS>..'<CR><CR>alias c1='cd ..'<CR>alias c2='cd ../..'<CR>c<BS>alias c2<BS>3 <BS>='cd ../..//<BS>..'<CR>asl<BS><BS>lias c4 <BS>='cd ../../../..'<CR>alias ct<BS>6<BS>5/<BS>='cd ../../../../..':<BS><Esc>:wq<CR>

0 comments


Created by: @rax0m

139 active golfers, 758 entries

Leaderboard (lowest score wins):
51
#91 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 03:24PM

53
#92 - Anthony BERNARD / @TweetTontony

02/15/2020 at 09:26PM

54
#93 - (h i) / @hi_eduardo

01/31/2020 at 03:11AM

54
#94 - Matthew Bourque / @MattJBourque

02/02/2020 at 09:55PM

54
#95 - Matt / @Matt85092908

02/12/2020 at 10:40PM

54
#96 - mnx / @mnxx

02/20/2020 at 10:41PM

54
#97 - Jason / @roosjason

04/06/2020 at 09:27AM

54
#98 - Christ / @Christ46234422

09/09/2020 at 08:12AM

56
#99 - Toby Hawkins / @Toby_Hawkins

03/14/2020 at 04:46PM

56
#100 - dule2607 / @dule26071

05/06/2020 at 12:08PM

56
#101 - RockerZZY / @rocker_zzy

06/07/2020 at 03:20AM

57
#102 - Ollin Boer Bohan / @madebyollin

01/29/2020 at 03:30PM

57
#103 - rye bread / @theryangeary

01/29/2020 at 05:53PM

57
#104 - Valdimar / @genkobar

06/01/2020 at 11:10PM

58
#105 - Ick / @Ickaser

02/27/2020 at 08:59PM

58
#106 - Mack Hutsell / @sellshuts

05/24/2020 at 06:51PM

59
#107 - Karnival K / @K4rnival

02/04/2020 at 08:12PM

59
#108 - {{ profile.name }} / @bytesonly

04/29/2020 at 08:41AM

59
#109 - Christophe Robillard / @krichtof

06/20/2020 at 09:55PM

61
#110 - malte0811 / @malte0811

04/03/2020 at 01:29PM

62
#111 - Marian Minar (jr.) / @majamin

01/29/2020 at 07:29PM

62
#112 - James Rayman / @jamsramen

03/13/2020 at 07:08PM

63
#113 - Ifeoluwa Lawal / @IfeLawl

10/27/2020 at 04:00PM

66
#114 - TheSemicolon / @the_semicolon_

02/25/2020 at 06:22PM

66
#115 - Jake Utley / @jakeutley

05/15/2020 at 07:21PM

68
#116 - Manish Baghel / @ManishBaghelz

05/15/2020 at 03:50PM

68
#117 - LCY / @Chooneh

06/02/2020 at 08:51AM

69
#118 - Toby de Havilland / @tobydeh

04/19/2020 at 09:42AM

71
#119 - P37vo4WS / @p37vo4

12/30/2020 at 12:37PM

74
#120 - Victor Chen / @VictorC89422342

03/04/2020 at 08:31PM