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 5e3c8d176ea90a00096b2e63

Quote modules

Complete golang import statement.

Start file
import
    encoding/json
    fmt
    math/rand
    net/http
    time

    github.com/graphql-go/graphql
End file
import (
    "encoding/json"
    "fmt"
    "math/rand"
    "net/http"
    "time"

    "github.com/graphql-go/graphql"
)

View Diff

1,6c1,6
< import
<     encoding/json
<     fmt
<     math/rand
<     net/http
<     time
---
> import (
>     "encoding/json"
>     "fmt"
>     "math/rand"
>     "net/http"
>     "time"
8c8,9
<     github.com/graphql-go/graphql
---
>     "github.com/graphql-go/graphql"
> )

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 72 remaining solutions by signing in and submitting your own entry
#73 LeGolfeurDu93 / @Du93Golfeur - Score: 103 - 02/14/20 @ 00:13
jw<C-V>jjjjI'<Esc><Esc>jjjj<C-V>kkkkE$A'<Esc><Esc>jjjjjji'<Esc>Ei'<BS><Esc>la'<Esc>:%s/"<BS>'/"<CR><Esc><Esc><Esc>kjl:%'<BS>s/'/"<CR>:<Esc><Esc>kkkkkklkla {<Esc>Go<BS><BS><BS><BS>)<Esc>/{<CR>s(<Esc>:x<CR>

0 comments


Created by: @xiote2

73 active golfers, 252 entries

Leaderboard (lowest score wins):
21
#1 - dryaurtis / @dryaurtis

02/08/2020 at 09:11PM

21
#2 - Xor547 / @Xor547

02/09/2020 at 04:16PM

21
#3 - Saki Gw / @Sakigw

02/10/2020 at 01:48PM

21
#4 - jrddp / @jrddp0

02/12/2020 at 01:29AM

21
#5 - Andre / @5starsmug

02/17/2020 at 01:49AM

21
#6 - Jonathan Stinson / @KnightdeadJohn

02/18/2020 at 09:43AM

21
#7 - Ard / @kokojarjar

02/18/2020 at 10:26AM

21
#8 - yhetsugiHMC / @yhetsugi

02/21/2020 at 01:22AM

22
#9 - Jon Krause / @jkrause314

02/08/2020 at 03:57AM

22
#10 - Hyunjoon / @yi_hyunjoon

02/09/2020 at 02:22PM

22
#11 - Smylers / @Smylers2

02/09/2020 at 11:57PM

22
#12 - MegaPascal / @PascalMega

02/10/2020 at 11:01AM

22
#13 - John Braxler / @braxler

02/10/2020 at 03:00PM

22
#14 - Alexander Bessonov / @nonsleepr

02/13/2020 at 03:28PM

22
#15 - howanto / @ho_wan_

02/15/2020 at 09:35PM

22
#16 - Matthew / @Burfield12

02/17/2020 at 10:16PM

22
#17 - floyd / @floyd10086

02/22/2020 at 05:15PM

23
#18 - stretchy / @stretch11013132

02/15/2020 at 09:03PM

23
#19 - TimMcGuire / @mcguire

02/18/2020 at 04:04PM

24
#20 - garry quested / @GQuested

02/07/2020 at 09:39AM

24
#21 - Sander Vanhove / @SanderVhove

02/08/2020 at 09:13PM

24
#22 - KingYames / @JamesZeHunter

02/17/2020 at 02:19AM

25
#23 - Ollin Boer Bohan / @madebyollin

02/06/2020 at 11:03PM

25
#24 - Arijus / @argshook

02/07/2020 at 02:48PM

25
#25 - Clemens Köhler / @clemens_khler

02/07/2020 at 05:05PM

25
#26 - Niko Kivelä / @Tovrleaf

02/09/2020 at 04:41PM

25
#27 - Jason Neylon / @jasonneylon

02/10/2020 at 08:27PM

25
#28 - Matt / @Matt85092908

02/12/2020 at 10:55PM

25
#29 - Emil / @emilklindt

02/16/2020 at 09:14PM

25
#30 - Tinko Minko / @tandikula

02/19/2020 at 11:42PM