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 145 remaining solutions by signing in and submitting your own entry
#146 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

146 active golfers, 819 entries

Leaderboard (lowest score wins):
43
#61 - 廖彥智 / @JeffYenchih

04/15/2020 at 09:27AM

43
#62 - Martin Kauppinen / @MartinKauppinen

08/15/2020 at 08:23PM

44
#63 - Michał / @MichalPiotrK

02/03/2020 at 11:29AM

44
#64 - moh ayaya / @AyayaMoh

11/11/2020 at 06:44PM

44
#65 - 蔡徐坤真是爱吃屎 / @Hashub7

01/21/2021 at 01:27PM

45
#66 - golferN / @golferN3

02/27/2020 at 08:10PM

45
#67 - bluemartian / @bluemartianz59

03/24/2020 at 05:20PM

45
#68 - Victor Ramirez / @virako

04/01/2020 at 11:08AM

45
#69 - Nathan Hartman / @hnathan918

04/02/2020 at 02:28PM

45
#70 - Martin Bielik / @mabielik

08/10/2020 at 08:15PM

45
#71 - Gytis Vinclovas / @GytisVinclovas

10/08/2020 at 03:59PM

45
#72 - justinhj / @justinhj

01/02/2021 at 08:44PM

46
#73 - Moye_ / @moye_

02/26/2020 at 03:43AM

46
#74 - Viktor Styrud / @ViktorStyrud

03/13/2020 at 11:55AM

46
#75 - Marco / @Marco24456514

03/21/2020 at 10:03PM

46
#76 - Robberechts Arne / @ArneRobberechts

03/22/2020 at 10:04PM

46
#77 - zaid emad / @zaid_emad97

03/26/2020 at 12:01AM

46
#78 - Jeff Cui / @jeffacce

05/12/2020 at 10:10AM

46
#79 - 于吉星 / @fishermryn

05/23/2020 at 01:10PM

46
#80 - Bob / @Bob37174065

06/01/2020 at 05:57PM

46
#81 - mocihan / @mocihan

07/02/2020 at 12:11PM

46
#82 - igb43773@eoopy.com / @igb43773

08/06/2020 at 02:13PM

46
#83 - Ivan Kwong / @IvanKwong5

10/04/2020 at 08:14AM

46
#84 - zapakh / @zapakh

01/21/2021 at 05:07PM

47
#85 - Noah / @NoahRosenzweig

02/12/2020 at 11:39PM

47
#86 - Sean Dewar / @seandewar

03/12/2020 at 10:30PM

47
#87 - Roland Crosby / @roooooland

05/07/2020 at 09:01PM

48
#88 - Ricardo / @argvniyx

01/31/2020 at 05:27AM

48
#89 - cardoiltardo / @cardoiltardo

02/04/2020 at 03:58PM

48
#90 - Steffen / @Pions90

02/14/2020 at 03:27PM