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 by @assaflavie:

Unlock 8 remaining solutions by signing in and submitting your own entry
Created by: @mcr05

40 active golfers, 90 entries

Solutions by @assaflavie:
14
#10 - we’re going to need a bigger bot / @assaflavie

07/07/2015 at 06:44PM

14
#>10 - we’re going to need a bigger bot / @assaflavie

07/07/2015 at 06:53PM

15
#>22 - we’re going to need a bigger bot / @assaflavie

07/07/2015 at 06:51PM

17
#>29 - we’re going to need a bigger bot / @assaflavie

07/07/2015 at 06:42PM

19
#>37 - we’re going to need a bigger bot / @assaflavie

07/07/2015 at 06:41PM

21
#>39 - we’re going to need a bigger bot / @assaflavie

07/07/2015 at 06:20PM

21
#>39 - we’re going to need a bigger bot / @assaflavie

07/07/2015 at 06:37PM

23
#>39 - we’re going to need a bigger bot / @assaflavie

07/07/2015 at 06:33PM