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

Context Insensitive completion 1

Finish writing this simple Python HTTP server.

Start file
from SimpleHTTPServer import SimpleHTTPRequestHandler
from SocketServer import TCPServer

ADDR = ("", 8080)
httpd = # Finish this line
httpd.serve_forever()
End file
from SimpleHTTPServer import SimpleHTTPRequestHandler
from SocketServer import TCPServer

ADDR = ("", 8080)
httpd = TCPServer(ADDR, SimpleHTTPRequestHandler)
httpd.serve_forever()

View Diff

5c5
< httpd = # Finish this line
---
> httpd = TCPServer(ADDR, SimpleHTTPRequestHandler)

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 244 remaining solutions by signing in and submitting your own entry
#245 Ryan / @Rdgy567889 - Score: 78 - 05/17/23 @ 19:53
4jf#d$aTCPSE<BS>erver(a<BS>ADDR, SimpleHTTPReau<BS><BS>questHqndl<BS><BS><BS><BS>andler)<Esc>ax<BS><Esc>d$a)<Esc>:wq<CR>

0 comments


Created by: @wolever

245 active golfers, 498 entries

Leaderboard (lowest score wins):
48
#241 - Tom Adams / @holizz

12/29/2010 at 07:16PM

49
#242 - Austin Ware / @AustinWare17

03/13/2018 at 04:09AM

49
#243 - xiaoao1024 / @xiaoao1024

01/02/2024 at 02:37PM

56
#244 - amberg12 / @amberg12

08/13/2024 at 11:40PM

78
#245 - Ryan / @Rdgy567889

05/17/2023 at 07:53PM