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 55e814a35f5608403d000001

Vim's not included features

Filter not included (-) features in a hypothetical installation of vim.

Start file
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         -gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
End file
-balloon_eval
-browse
-clientserver
-dnd
-ebcdic
-footer
-gettext
-hangul_input
-lua
-mouseshape
-mouse_gpm
-mouse_jsbterm
-mouse_sysmouse
-mzscheme
-python3
-sniff
-sun_workshop
-tag_any_white
-tcl
-toolbar
-X11
-xfontset
-xim
-xsmp
-xterm_clipboard
-xterm_save
-xpm

View Diff

1,28c1,27
< +acl             +farsi           +mouse_netterm   +syntax
< +arabic          +file_in_path    +mouse_sgr       +tag_binary
< +autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
< -balloon_eval    +float           +mouse_urxvt     -tag_any_white
< -browse          +folding         +mouse_xterm     -tcl
< ++builtin_terms  -footer          +multi_byte      +terminfo
< +byte_offset     +fork()          +multi_lang      +termresponse
< +cindent         -gettext         -mzscheme        +textobjects
< -clientserver    -hangul_input    +netbeans_intg   +title
< +clipboard       +iconv           +path_extra      -toolbar
< +cmdline_compl   +insert_expand   +perl            +user_commands
< +cmdline_hist    +jumplist        +persistent_undo +vertsplit
< +cmdline_info    +keymap          +postscript      +virtualedit
< +comments        +langmap         +printer         +visual
< +conceal         +libcall         +profile         +visualextra
< +cryptv          +linebreak       +python          +viminfo
< +cscope          +lispindent      -python3         +vreplace
< +cursorbind      +listcmds        +quickfix        +wildignore
< +cursorshape     +localmap        +reltime         +wildmenu
< +dialog_con      -lua             +rightleft       +windows
< +diff            +menu            +ruby            +writebackup
< +digraphs        +mksession       +scrollbind      -X11
< -dnd             +modify_fname    +signs           -xfontset
< -ebcdic          +mouse           +smartindent     -xim
< +emacs_tags      -mouseshape      -sniff           -xsmp
< +eval            +mouse_dec       +startuptime     -xterm_clipboard
< +ex_extra        -mouse_gpm       +statusline      -xterm_save
< +extra_search    -mouse_jsbterm   -sun_workshop    -xpm
---
> -balloon_eval
> -browse
> -clientserver
> -dnd
> -ebcdic
> -footer
> -gettext
> -hangul_input
> -lua
> -mouseshape
> -mouse_gpm
> -mouse_jsbterm
> -mouse_sysmouse
> -mzscheme
> -python3
> -sniff
> -sun_workshop
> -tag_any_white
> -tcl
> -toolbar
> -X11
> -xfontset
> -xim
> -xsmp
> -xterm_clipboard
> -xterm_save
> -xpm

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 40 remaining solutions by signing in and submitting your own entry
#41 Pete Sevander / Sevanteri - Score: 37 - 11/12/15 @ 13:53
Q%s: :\r:g<CR>1,$-sor i<CR>637m633<CR>625,$x!<CR>

0 comments

#42 Daniel / Daniel00288663 - Score: 37 - 04/03/17 @ 12:58
Q%s: :\r:g<CR>1,$-sor i<CR>637m633<CR>625,$x!<CR>

0 comments

#43 Walker Boh / walker_boh - Score: 38 - 09/30/15 @ 14:20
Q%s/\s\+/\r/g<CR>g/+/d<CR>1,$- sor i<CR>13m9|x<CR>

0 comments

#44 Bogumił Kamiński / BogumilKaminski - Score: 38 - 10/26/15 @ 16:31
qqW<C-V>G$xGo<Esc>pq2@qqq/+<CR>ddq99@q:%s/\s\+<CR>ZZ

0 comments

#45 Davy Dovanton / anton_davydov - Score: 41 - 09/03/15 @ 10:10
qwW<C-V>G$dGo<Esc>pq2@w/+<CR>qqddn@qq@q:%s/\s\+//<CR>ZZ

0 comments

#46 luffy / raxcoi - Score: 41 - 09/13/15 @ 20:29
qq$B<C-V>27j$d27j:pu<CR>ggq2@q:g/+/d<CR>:%s/ \+/<CR>ZZ

0 comments

#47 oscar / zonza_mas - Score: 43 - 09/03/15 @ 15:56
qaW<C-V>G$dGo<Esc>pq2@a:s<BS>%s/\s//g<CR>/+<CR>nqwndd@wq@wZZ

0 comments

#48 Joey / joeyism101 - Score: 43 - 09/04/15 @ 13:39
qwW<C-V>G$dGo<Esc>pq2@w/+<CR>qqddn@qq@q:%s/\s\+//<CR>:wq<CR>

0 comments

#49 Anoop Kumar / anooplive - Score: 49 - 09/03/15 @ 13:09
:%s/\_s\+/\r/g<CR>:v/^-/d<CR>:sort i<CR>13Gdd10GP24GddGpZZ

0 comments

#50 Yaroslav Kanarev / yarosurabu - Score: 53 - 09/07/15 @ 12:42
:%s/ \+/\r/g<CR>ggqqd/-<CR>/+<CR>q17@q:1,26sort i<CR>:13<CR>dd:9<CR>pZZ

0 comments

Created by: pauloromeira

50 active golfers, 136 entries

Leaderboard (lowest score wins):
23
#1 - Jon Krause / jkrause314

06/28/2016 at 09:09PM

23
#2 - Kerson Hsiao / KersonHsiao

07/01/2016 at 12:04AM

23
#3 - Bill Ruddock / biinari

10/25/2016 at 04:08PM

23
#4 - John Braxler / braxler

11/23/2016 at 06:01PM

24
#5 - Urtica dioica / udioica

09/03/2015 at 11:41PM

25
#6 - Mutter Mumble / muttermumble

09/03/2015 at 08:48PM

25
#7 - Lifepillar / lifepillar

09/03/2015 at 09:30PM

25
#8 - Petro Тrouq / zulolosi

09/04/2015 at 03:03AM

25
#9 - João Carvalho / joaoCarvas

09/04/2015 at 01:08PM

25
#10 - pftb12345 / pftb12345

09/05/2015 at 03:10AM

25
#11 - JS / jjohsan

09/05/2015 at 01:24PM

25
#12 - Bart / oneofmanybarts

09/08/2015 at 02:27PM

25
#13 - Tom Cammann / tea_sea

09/14/2015 at 03:23PM

25
#14 - Ben Vandervalk / benvvalk

09/19/2015 at 02:50AM

25
#15 - Mikael Saltzman / MikaelSaltzman

09/25/2015 at 04:05PM

25
#16 - Mike Adams / davis_cromwell

09/27/2015 at 11:39PM

25
#17 - ojung / oskrjung

10/05/2015 at 01:55AM

25
#18 - Robert Goeddel / f0rdpr3fect

11/10/2015 at 08:27PM

25
#19 - Carlos A Henríquez Q / lagunex

03/13/2016 at 09:19PM

25
#20 - Aleksey Zhidkov / AlexeyZhidkov

03/14/2016 at 05:33AM

25
#21 - Dimitar Dimitrov / kurkale6ka

03/17/2016 at 03:14PM

25
#22 - Tyler / tylerbindon

06/30/2016 at 05:23AM

25
#23 - Kai Yuan / kentyuan

06/30/2016 at 12:12PM

26
#24 - T A / SirAviles

09/06/2015 at 08:53PM

28
#25 - Chenut Ludovic / 7Brwa7

04/06/2016 at 03:25PM

29
#26 - Tim Chase / gumnos

09/03/2015 at 02:53PM

31
#27 - Matthieu Crapet / mcr05

09/13/2015 at 09:03AM

32
#28 - Saki Gw / Sakigw

02/02/2017 at 02:45AM

33
#29 - Gabriel Florit / gabrielflorit

09/05/2015 at 07:33AM

33
#30 - Rasmus P / rasmup

09/15/2015 at 09:49PM

33
#31 - NuM / NuM314

10/24/2015 at 10:04AM

33
#32 - Árpád Krejczinger / krarpi

11/11/2015 at 01:15PM

33
#33 - Frederik Klama / fklama

01/27/2016 at 02:42PM

34
#34 - Keyboard Fire / KeyboardFire

09/11/2015 at 09:08PM

34
#35 - Zach Gulde / zgulde

02/29/2016 at 06:45AM

35
#36 - Mart T / xtimmu

09/03/2015 at 06:48PM

35
#37 - Georgi Georgiev / GeorgievGeorgeS

09/06/2015 at 10:57AM

36
#38 - Kevin Merlin / mp3merlin

09/17/2015 at 09:05AM

37
#39 - Paulo H Baumann / PauloBaumann

09/15/2015 at 11:18PM

37
#40 - Marcin Sza / coot_

09/16/2015 at 07:50AM

37
#41 - Pete Sevander / Sevanteri

11/12/2015 at 01:53PM

37
#42 - Daniel / Daniel00288663

04/03/2017 at 12:58PM

38
#43 - Walker Boh / walker_boh

09/30/2015 at 02:20PM

38
#44 - Bogumił Kamiński / BogumilKaminski

10/26/2015 at 04:31PM

41
#45 - Davy Dovanton / anton_davydov

09/03/2015 at 10:10AM

41
#46 - luffy / raxcoi

09/13/2015 at 08:29PM

43
#47 - oscar / zonza_mas

09/03/2015 at 03:56PM

43
#48 - Joey / joeyism101

09/04/2015 at 01:39PM

49
#49 - Anoop Kumar / anooplive

09/03/2015 at 01:09PM

53
#50 - Yaroslav Kanarev / yarosurabu

09/07/2015 at 12:42PM