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 5598ef76c0132f45c9005238

Entries sort

It cames to my mind a weird idea : sorting parts of my .vimrc. Take few minutes to sort out this, it's easy !

Start file
set ai                                          " set auto-indenting on for programming
syntax on                                       " turn syntax highlighting on by default
set undolevels=100
set backup backupdir=/tmp                       " swap files. (/tmp/file~)
                                                " (see also 'set writebackup' and 'set backupskip')
iab _file <C-R>%                                " filename (register %)
autocmd! BufWritePost $MYVIMRC source $MYVIMRC  " auto-reload when ~/.vimrc is edited
                                                " MYVIMRC is the platform-independent location
                                                " of your .vimrc file
End file
autocmd! BufWritePost $MYVIMRC source $MYVIMRC  " auto-reload when ~/.vimrc is edited
                                                " MYVIMRC is the platform-independent location
                                                " of your .vimrc file
iab _file <C-R>%                                " filename (register %)
set ai                                          " set auto-indenting on for programming
set backup backupdir=/tmp                       " swap files. (/tmp/file~)
                                                " (see also 'set writebackup' and 'set backupskip')
set undolevels=100
syntax on                                       " turn syntax highlighting on by default

View Diff

1,6d0
< set ai                                          " set auto-indenting on for programming
< syntax on                                       " turn syntax highlighting on by default
< set undolevels=100
< set backup backupdir=/tmp                       " swap files. (/tmp/file~)
<                                                 " (see also 'set writebackup' and 'set backupskip')
< iab _file <C-R>%                                " filename (register %)
9a4,9
> iab _file <C-R>%                                " filename (register %)
> set ai                                          " set auto-indenting on for programming
> set backup backupdir=/tmp                       " swap files. (/tmp/file~)
>                                                 " (see also 'set writebackup' and 'set backupskip')
> set undolevels=100
> syntax on                                       " turn syntax highlighting on by default

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 25 remaining solutions by signing in and submitting your own entry
#26 江裕诚 / fatjyc - Score: 18 - 07/14/15 @ 14:59
:sor<CR>:m7<CR>:1,2m3<CR>ZZ

0 comments

#27 Endre Galaczi / galacziendre - Score: 18 - 08/04/15 @ 09:43
:sor<CR>:m7<CR>:1,2m3<CR>ZZ

0 comments

#28 Joey / joeyism101 - Score: 18 - 09/11/15 @ 01:21
:sor<CR>:m7<CR>:1,2m3<CR>ZZ

0 comments

#29 Carlos A Henríquez Q / lagunex - Score: 18 - 03/15/16 @ 23:16
:sor<CR>dd7GP3GddHPZZ

0 comments

#30 Lifepillar / lifepillar - Score: 19 - 07/05/15 @ 14:35
MddGdk:sor<CR>p4j"2pZZ

0 comments

#31 Anton Davydov / anton_davydov - Score: 21 - 07/05/15 @ 10:37
jddpdkGV3kpggPdd2jpZZ

0 comments

#32 Teemu Okkonen / TeemuOkkonen - Score: 26 - 07/05/15 @ 15:28
:7,9d<CR>PdGggP5jddGp3kddjpZZ

0 comments

Created by: mcr05

32 active golfers, 69 entries

Leaderboard (lowest score wins):
14
#1 - Urtica dioica / udioica

07/05/2015 at 11:13AM

14
#2 - Carlos López / morrizon

07/05/2015 at 05:11PM

14
#3 - Petro Тrouq / zulolosi

07/06/2015 at 05:41AM

14
#4 - Bart / oneofmanybarts

07/06/2015 at 07:32AM

14
#5 - Mutter Mumble / muttermumble

07/06/2015 at 10:15AM

14
#6 - John Braxler / braxler

07/06/2015 at 02:12PM

14
#7 - Matthieu Crapet / mcr05

07/06/2015 at 07:54PM

14
#8 - Adrian Krehl / akrehl

07/07/2015 at 12:24PM

14
#9 - Elizabeth / sprinkles418

07/07/2015 at 06:08PM

14
#10 - Assaf Lavie / AssafLavie

07/07/2015 at 06:44PM

14
#11 - jake romer / notjakeromer

07/10/2015 at 04:26AM

14
#12 - Steffen Köhler / Baertierchen

07/11/2015 at 10:18PM

14
#13 - Jason Schulz / uxcn_

07/26/2015 at 01:32AM

14
#14 - Ferdev vimgolf / fergvimgolf

08/13/2015 at 10:03PM

14
#15 - Liam Thurston / lthurston188

08/18/2015 at 04:38AM

14
#16 - S.Lebedev / drasgo

08/28/2015 at 10:40PM

14
#17 - Walker Boh / walker_boh

10/12/2015 at 11:03AM

14
#18 - Jon Krause / jkrause314

01/15/2016 at 04:37AM

16
#19 - Jonas Ng / jnshey

07/20/2015 at 05:18PM

16
#20 - Kazuhide Shitamura / kazuhid05139013

08/01/2015 at 11:29AM

16
#21 - Pete Sevander / Sevanteri

11/13/2015 at 02:06PM

17
#22 - pftb12345 / pftb12345

07/05/2015 at 01:44PM

17
#23 - Gerald Tilma / GeraldTilma

10/21/2015 at 01:11AM

17
#24 - Matti Sairanen / MattiSairanen

09/05/2017 at 12:39PM

18
#25 - Samuel Masuy / samasuy

07/05/2015 at 07:24PM

18
#26 - 江裕诚 / fatjyc

07/14/2015 at 02:59PM

18
#27 - Endre Galaczi / galacziendre

08/04/2015 at 09:43AM

18
#28 - Joey / joeyism101

09/11/2015 at 01:21AM

18
#29 - Carlos A Henríquez Q / lagunex

03/15/2016 at 11:16PM

19
#30 - Lifepillar / lifepillar

07/05/2015 at 02:35PM

21
#31 - Anton Davydov / anton_davydov

07/05/2015 at 10:37AM

26
#32 - Teemu Okkonen / TeemuOkkonen

07/05/2015 at 03:28PM