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

155 active golfers, 879 entries

Leaderboard (lowest score wins):
47
#91 - Sean Dewar / @seandewar

03/12/2020 at 10:30PM

47
#92 - Roland Crosby / @roooooland

05/07/2020 at 09:01PM

48
#93 - Ricardo / @argvniyx

01/31/2020 at 05:27AM

48
#94 - cardoiltardo / @cardoiltardo

02/04/2020 at 03:58PM

48
#95 - Steffen / @Pions90

02/14/2020 at 03:27PM

48
#96 - grsh / @girish_i_am

05/28/2021 at 06:57PM

48
#97 - Paul McDowell / @etothepi16

05/23/2024 at 09:27PM

49
#98 - garry quested / @GQuested

01/30/2020 at 12:29PM

49
#99 - Emil / @emilklindt

02/05/2020 at 11:51AM

50
#100 - Celebrindal / @idrilirdi

02/03/2020 at 03:21PM

51
#101 - Hector Davensburg / @hdavensburg

01/29/2020 at 04:51PM

51
#102 - Dmitriy Olshevskiy / @olshevskiy_dv

02/24/2020 at 07:00PM

51
#103 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 03:24PM

51
#104 - Lily / @totallyuniquelily

05/10/2024 at 08:20PM

52
#105 - Manish Baghel / @ManishBaghelz

06/05/2021 at 04:35PM

53
#106 - Anthony BERNARD / @TweetTontony

02/15/2020 at 09:26PM

54
#107 - (h i) / @hi_eduardo

01/31/2020 at 03:11AM

54
#108 - Matthew Bourque / @MattJBourque

02/02/2020 at 09:55PM

54
#109 - Matt / @Matt85092908

02/12/2020 at 10:40PM

54
#110 - mnx / @mnxx

02/20/2020 at 10:41PM

54
#111 - Jason / @roosjason

04/06/2020 at 09:27AM

54
#112 - Christ / @Christ46234422

09/09/2020 at 08:12AM

55
#113 - Olivier Bégassat / @zk_evm

06/11/2023 at 07:14PM

56
#114 - Toby Hawkins / @Toby_Hawkins

03/14/2020 at 04:46PM

56
#115 - dule2607 / @dule26071

05/06/2020 at 12:08PM

56
#116 - RockerZZY / @rocker_zzy

06/07/2020 at 03:20AM

57
#117 - Ollin Boer Bohan / @madebyollin

01/29/2020 at 03:30PM

57
#118 - rye bread / @theryangeary

01/29/2020 at 05:53PM

57
#119 - Valdimar / @genkobar

06/01/2020 at 11:10PM

58
#120 - Ick / @Ickaser

02/27/2020 at 08:59PM