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):
17
#181 - Ryan Kois / @r_kois

06/20/2012 at 11:12PM

17
#182 - Michael Mior / @michaelmior

07/11/2012 at 07:48PM

17
#183 -  Ikhsan Maulana / @ixandidu

08/18/2012 at 02:42PM

17
#184 - Arto Vuori / @dhpe

08/31/2012 at 07:33PM

17
#185 - Javier Cervantes / @solojavier

09/04/2012 at 06:36PM

17
#186 - Daniel / @dpaneda

11/10/2012 at 08:51PM

17
#187 - Dominick LoBraico / @pygatea

12/11/2012 at 11:19PM

17
#188 - Michael / @patheticpat

12/16/2012 at 06:44PM

17
#189 - lucapette / @lucapette

01/27/2013 at 07:50PM

17
#190 - Karun Ramakrishnan / @the_karun

04/08/2013 at 03:43AM

17
#191 - RobertT / @techrt2050

07/16/2013 at 05:02AM

17
#192 - Matt Robbins / @mcrmfc

08/09/2013 at 08:04AM

17
#193 - brett / @brettyukich

09/21/2013 at 10:14PM

17
#194 - nona urbiz / @nospampleasemam

09/28/2013 at 10:07AM

17
#195 - wilddog64 / @chengkai318

12/24/2013 at 03:14AM

17
#196 - Allan Tokuda / @atokuda

12/26/2013 at 08:50PM

17
#197 - pete / @peteches

02/23/2014 at 04:12PM

17
#198 - Felipe Jaramillo F / @mrfelipe

04/03/2014 at 03:58AM

17
#199 - Kyle Travis / @kmakai

05/16/2014 at 10:20PM

17
#200 - ひげまにや / @higemaniya

07/03/2014 at 12:26AM

17
#201 - Justin Beaudry / @JustinNBeaudry

07/08/2014 at 10:36PM

17
#202 - Patrick Pitoscia / @Patrick03960431

08/16/2014 at 03:54AM

17
#203 - chaffinch / @chaffinch

08/25/2014 at 03:41PM

17
#204 - Justin Knag / @justinknag

08/28/2014 at 03:24PM

17
#205 - Gerald Tilma / @GeraldTilma

10/22/2015 at 02:15AM

17
#206 - Matt McNeil / @mmcnl

11/11/2015 at 09:08AM

17
#207 - Etienne Tremel / @etiennetremel

02/09/2016 at 09:18PM

17
#208 - Ryan van Rensburg / @rdvr001

07/23/2016 at 10:20AM

17
#209 - jn / @j1357924

09/14/2016 at 07:50PM

17
#210 - phucvin / @phucvin

02/15/2018 at 05:13AM