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

Exchanging Quotes

Sometimes you need to exchange a choice of quotes in some code.

Start file
mystring = 'This quoted string contains \' and is also'
           'surrounded with \' characters.  It is also'
           'a multiline string too'
End file
mystring = "This quoted string contains ' and used to be"
           "surrounded with ' characters.  It is also"
           "a multiline string too"

View Diff

1,3c1,3
< mystring = 'This quoted string contains \' and is also'
<            'surrounded with \' characters.  It is also'
<            'a multiline string too'
---
> mystring = "This quoted string contains ' and used to be"
>            "surrounded with ' characters.  It is also"
>            "a multiline string too"

Solutions by @bpark0:

Unlock 11 remaining solutions by signing in and submitting your own entry
Created by: @jlozinski

225 active golfers, 821 entries

Solutions by @bpark0:
41
#191 - Bruce Park / @bpark0

08/05/2018 at 09:21PM

42
#>195 - Bruce Park / @bpark0

08/05/2018 at 09:15PM

43
#>198 - Bruce Park / @bpark0

01/29/2018 at 01:04AM

44
#>202 - Bruce Park / @bpark0

01/29/2018 at 12:51AM

45
#>206 - Bruce Park / @bpark0

01/29/2018 at 12:47AM

45
#>206 - Bruce Park / @bpark0

01/29/2018 at 01:01AM

46
#>208 - Bruce Park / @bpark0

01/22/2018 at 02:46AM

46
#>208 - Bruce Park / @bpark0

01/29/2018 at 12:47AM

49
#>214 - Bruce Park / @bpark0

01/22/2018 at 02:44AM

54
#>216 - Bruce Park / @bpark0

12/11/2017 at 03:16AM

69
#>223 - Bruce Park / @bpark0

12/11/2017 at 03:06AM