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 114 remaining solutions by signing in and submitting your own entry
#115 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

115 active golfers, 428 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

21
#9 - countime / @countime1

03/04/2020 at 08:24AM

21
#10 - Wouter Horlings / @Achilleshiel

03/12/2020 at 11:21AM

21
#11 - Viktor Styrud / @ViktorStyrud

03/12/2020 at 04:00PM

21
#12 - せいほう / @FICSQF

03/16/2020 at 02:57AM

21
#13 - Yan Xue / @_yxue

03/22/2020 at 09:03PM

21
#14 - Quark / @PuzzleQuark

03/23/2020 at 10:43PM

21
#15 - Rodrigo V. Lopes / @rodvlopes

03/24/2020 at 06:48PM

22
#16 - Jon Krause / @jkrause314

02/08/2020 at 03:57AM

22
#17 - Hyunjoon / @yi_hyunjoon

02/09/2020 at 02:22PM

22
#18 - Smylers / @Smylers2

02/09/2020 at 11:57PM

22
#19 - MegaPascal / @PascalMega

02/10/2020 at 11:01AM

22
#20 - John Braxler / @braxler

02/10/2020 at 03:00PM

22
#21 - Alexander Bessonov / @nonsleepr

02/13/2020 at 03:28PM

22
#22 - howanto / @ho_wan_

02/15/2020 at 09:35PM

22
#23 - Matthew / @Burfield12

02/17/2020 at 10:16PM

22
#24 - floyd / @floyd10086

02/22/2020 at 05:15PM

22
#25 - TheSemicolon / @the_semicolon_

02/25/2020 at 05:08PM

22
#26 - Tefe / @tefetic

03/02/2020 at 08:50PM

22
#27 - Paul Parker / @PaulDesmoParker

03/05/2020 at 04:59AM

22
#28 - Robberechts Arne / @ArneRobberechts

03/22/2020 at 05:03PM

22
#29 - nicosierra / @nicosierra84

03/22/2020 at 08:05PM

22
#30 - zaid emad / @zaid_emad97

03/25/2020 at 11:38PM