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):
45
#61 - golferN / @golferN3

02/27/2020 at 08:10PM

45
#62 - bluemartian / @bluemartianz59

03/24/2020 at 05:20PM

45
#63 - Victor Ramirez / @virako

04/01/2020 at 11:08AM

45
#64 - Nathan Hartman / @hnathan918

04/02/2020 at 02:28PM

45
#65 - Martin Bielik / @mabielik

08/10/2020 at 08:15PM

45
#66 - Gytis Vinclovas / @GytisVinclovas

10/08/2020 at 03:59PM

45
#67 - justinhj / @justinhj

01/02/2021 at 08:44PM

46
#68 - Moye_ / @moye_

02/26/2020 at 03:43AM

46
#69 - Viktor Styrud / @ViktorStyrud

03/13/2020 at 11:55AM

46
#70 - Marco / @Marco24456514

03/21/2020 at 10:03PM

46
#71 - Robberechts Arne / @ArneRobberechts

03/22/2020 at 10:04PM

46
#72 - zaid emad / @zaid_emad97

03/26/2020 at 12:01AM

46
#73 - Jeff Cui / @jeffacce

05/12/2020 at 10:10AM

46
#74 - δΊŽε‰ζ˜Ÿ / @fishermryn

05/23/2020 at 01:10PM

46
#75 - Bob / @Bob37174065

06/01/2020 at 05:57PM

46
#76 - mocihan / @mocihan

07/02/2020 at 12:11PM

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

08/06/2020 at 02:13PM

46
#78 - Ivan Kwong / @IvanKwong5

10/04/2020 at 08:14AM

46
#79 - zapakh / @zapakh

01/21/2021 at 05:07PM

47
#80 - Noah / @NoahRosenzweig

02/12/2020 at 11:39PM

47
#81 - Sean Dewar / @seandewar

03/12/2020 at 10:30PM

47
#82 - Roland Crosby / @roooooland

05/07/2020 at 09:01PM

48
#83 - Ricardo / @argvniyx

01/31/2020 at 05:27AM

48
#84 - cardoiltardo / @cardoiltardo

02/04/2020 at 03:58PM

48
#85 - Steffen / @Pions90

02/14/2020 at 03:27PM

49
#86 - garry quested / @GQuested

01/30/2020 at 12:29PM

49
#87 - Emil / @emilklindt

02/05/2020 at 11:51AM

50
#88 - Celebrindal / @idrilirdi

02/03/2020 at 03:21PM

51
#89 - Hector Davensburg / @hdavensburg

01/29/2020 at 04:51PM

51
#90 - Dmitriy Olshevskiy / @olshevskiy_dv

02/24/2020 at 07:00PM