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 4fca701fd3a0d40001000074

Remove noise from HTTP log

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

Start file
fcrawler.looksmart.com - - [26/Apr/2000:00:00:12 -0400] "GET /contacts.html HTTP/1.0" 200 4595 "-" "FAST-WebCrawler/2.1-pre2 (ashen@looksmart.net)"
fcrawler.looksmart.com - - [26/Apr/2000:00:17:19 -0400] "GET /news/news.html HTTP/1.0" 200 16716 "-" "FAST-WebCrawler/2.1-pre2 (ashen@looksmart.net)"
ppp931.on.bellglobal.com - - [26/Apr/2000:00:16:12 -0400] "GET /download/windows/asctab31.zip HTTP/1.0" 200 1540096 "http://www.htmlgoodies.com/downloads/freeware/webdevelopment/15.html" "Mozilla/4.7 [en]C-SYMPA  (Win95; U)"
123.123.123.123 - - [26/Apr/2000:00:23:48 -0400] "GET /pics/wpaper.gif HTTP/1.0" 200 6248 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
123.123.123.123 - - [26/Apr/2000:00:23:47 -0400] "GET /asctortf/ HTTP/1.0" 200 8130 "http://search.netscape.com/Computers/Data_Formats/Document/Text/RTF" "Mozilla/4.05 (Macintosh; I; PPC)"
123.123.123.123 - - [26/Apr/2000:00:23:48 -0400] "GET /pics/5star2000.gif HTTP/1.0" 200 4005 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
123.123.123.123 - - [26/Apr/2000:00:23:50 -0400] "GET /pics/5star.gif HTTP/1.0" 200 1031 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
123.123.123.123 - - [26/Apr/2000:00:23:51 -0400] "GET /pics/a2hlogo.jpg HTTP/1.0" 200 4282 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
123.123.123.123 - - [26/Apr/2000:00:23:51 -0400] "GET /cgi-bin/newcount?jafsof3&width=4&font=digital&noshow HTTP/1.0" 200 36 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
End file
GET /contacts.html
GET /news/news.html
GET /download/windows/asctab31.zip
GET /pics/wpaper.gif
GET /asctortf/
GET /pics/5star2000.gif
GET /pics/5star.gif
GET /pics/a2hlogo.jpg
GET /cgi-bin/newcount?jafsof3&width=4&font=digital&noshow

View Diff

1,9c1,9
< fcrawler.looksmart.com - - [26/Apr/2000:00:00:12 -0400] "GET /contacts.html HTTP/1.0" 200 4595 "-" "FAST-WebCrawler/2.1-pre2 (ashen@looksmart.net)"
< fcrawler.looksmart.com - - [26/Apr/2000:00:17:19 -0400] "GET /news/news.html HTTP/1.0" 200 16716 "-" "FAST-WebCrawler/2.1-pre2 (ashen@looksmart.net)"
< ppp931.on.bellglobal.com - - [26/Apr/2000:00:16:12 -0400] "GET /download/windows/asctab31.zip HTTP/1.0" 200 1540096 "http://www.htmlgoodies.com/downloads/freeware/webdevelopment/15.html" "Mozilla/4.7 [en]C-SYMPA  (Win95; U)"
< 123.123.123.123 - - [26/Apr/2000:00:23:48 -0400] "GET /pics/wpaper.gif HTTP/1.0" 200 6248 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
< 123.123.123.123 - - [26/Apr/2000:00:23:47 -0400] "GET /asctortf/ HTTP/1.0" 200 8130 "http://search.netscape.com/Computers/Data_Formats/Document/Text/RTF" "Mozilla/4.05 (Macintosh; I; PPC)"
< 123.123.123.123 - - [26/Apr/2000:00:23:48 -0400] "GET /pics/5star2000.gif HTTP/1.0" 200 4005 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
< 123.123.123.123 - - [26/Apr/2000:00:23:50 -0400] "GET /pics/5star.gif HTTP/1.0" 200 1031 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
< 123.123.123.123 - - [26/Apr/2000:00:23:51 -0400] "GET /pics/a2hlogo.jpg HTTP/1.0" 200 4282 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
< 123.123.123.123 - - [26/Apr/2000:00:23:51 -0400] "GET /cgi-bin/newcount?jafsof3&width=4&font=digital&noshow HTTP/1.0" 200 36 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
---
> GET /contacts.html
> GET /news/news.html
> GET /download/windows/asctab31.zip
> GET /pics/wpaper.gif
> GET /asctortf/
> GET /pics/5star2000.gif
> GET /pics/5star.gif
> GET /pics/a2hlogo.jpg
> GET /cgi-bin/newcount?jafsof3&width=4&font=digital&noshow

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 245 remaining solutions by signing in and submitting your own entry
#246 杨晨昀 Yangchenyun / @yangchenyun - Score: 500 - 08/08/12 @ 15:05
:%s/()<Left>.+<Right><Left><Left><Left><Left>\v<Right><Right><Right><Right>"G<BS>GET<BS><BS><BS><BS>"(GET<BS><BS><BS>GET \/()<Left>>=<BS><BS><Right><Left>[]<Right><BS><Left><Left><BS><Right>\w.<Right>+)/\1/g<CR>:<Up><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><Left><Left><Left><Left>()<Left>>+<BS><BS>.+<Right>\r<BS>n<CR>:<Down><Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><BS><Right><Right><BS>/<BS>\<Left>\\<Right><Right><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><CR>:<Up><Left><Right><Left><Left><BS><BS><Right><Right><BS>g<Left><Left><Left><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS>)<CR><Esc>unj<Esc>jjjjjj,/,<Esc><Esc>,/<Esc><Esc>kkuuujjjjkkkkkkkkkjjjjjkkllllllllllllllllllllllllllllllllllllllllllllllllllll:<Up><Left><Left><Left><Right><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><BS><Right><Right><Right><BS><Right><Right><Right><Right><Right> //<CR>:<Up><Left><Left><Left><Left><Left><Right><BS><BS>\/<CR><Esc>u:<Up><Left><Left><Left><Left><Right><Right>\1<CR><Esc>u:<Up><Left><Left><Left><Left><Left><Left>[]<Left>\w<Right>+<CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Right><BS><Left><Left><BS><CR><Esc>u:<Up><Left><Left><Left><Left><Left><Left><Left><BS><BS>[]<Left>^ <CR>:<Up><CR>u:<Up><CR>u:<Up><Left><Left><Left><Left><Left><Left><Left><Right><Right>.+<CR>:w<CR>:wq<CR>

0 comments


Created by: @laurilehmijoki

246 active golfers, 611 entries

Leaderboard (lowest score wins):
15
#91 - ZorgroZ / @ZorgroZ

04/12/2014 at 04:17PM

15
#92 - Birkir Ólafsson / @Birkirlafsson

07/27/2014 at 01:27PM

15
#93 - Tj / @yrddy

08/19/2014 at 08:08AM

15
#94 - eBrnd / @eBrnd

11/05/2014 at 10:39PM

15
#95 - r. / @rmarvie

12/20/2014 at 07:07PM

15
#96 - kimber gonzalez / @kimberlycreates

02/06/2015 at 07:17PM

15
#97 - pftb12345 / @pftb12345

04/11/2015 at 02:26PM

15
#98 - Evan Coleman / @edc1591

04/29/2015 at 09:44PM

15
#99 - Mauro Persano / @fzort

05/25/2015 at 01:36AM

15
#100 - Walker Boh / @walker_boh

10/14/2015 at 03:15PM

15
#101 - Jon Krause / @jkrause314

01/27/2016 at 08:28AM

15
#102 - Cristian Lupașcu / @clupasq

03/25/2016 at 01:57PM

15
#103 - tPenguinLTG / @tpenguinltg

05/13/2016 at 03:34AM

15
#104 - Robin Ramael / @RobinRamael

05/30/2016 at 09:08AM

15
#105 - Jordan Wightman / @tuo2

08/13/2016 at 01:06PM

15
#106 - Daniel Teal / @coelestinian

08/31/2016 at 08:45PM

15
#107 - Pierre Maoui / @poupougnac

01/13/2017 at 03:44PM

15
#108 - Zhihong Liu / @pieapple03

03/03/2017 at 04:01PM

15
#109 - Daniel / @Daniel00288663

03/31/2017 at 01:12PM

15
#110 - Colby Hamilton / @ColbyHamilton5

04/25/2017 at 06:55PM

15
#111 - Anthony George / @Xanuthatusu

06/11/2017 at 05:45AM

15
#112 - Brandon Height / @Lask0x

08/09/2017 at 09:19PM

15
#113 - Turkey Man / @lvturkeyman

11/25/2017 at 04:54AM

15
#114 - BarbaJol / @drpproteus

01/03/2018 at 09:46AM

15
#115 - c0llision / @sh3llcode

01/28/2018 at 02:12PM

15
#116 - Guirec CORBEL / @GuirecCorbel

04/19/2018 at 08:43AM

15
#117 - DHM / @DHM29978992

04/30/2018 at 04:31PM

15
#118 - slicklash / @slicklash

06/21/2018 at 12:37PM

15
#119 - Arijus / @argshook

06/21/2018 at 12:50PM

15
#120 - qed / @qed13308565

07/26/2018 at 12:40AM