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

230 active golfers, 858 entries

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

08/05/2018 at 09:21PM

42
#>200 - Bruce Park / @bpark0

08/05/2018 at 09:15PM

43
#>203 - Bruce Park / @bpark0

01/29/2018 at 01:04AM

44
#>207 - Bruce Park / @bpark0

01/29/2018 at 12:51AM

45
#>211 - Bruce Park / @bpark0

01/29/2018 at 12:47AM

45
#>211 - Bruce Park / @bpark0

01/29/2018 at 01:01AM

46
#>213 - Bruce Park / @bpark0

01/22/2018 at 02:46AM

46
#>213 - Bruce Park / @bpark0

01/29/2018 at 12:47AM

49
#>219 - Bruce Park / @bpark0

01/22/2018 at 02:44AM

54
#>221 - Bruce Park / @bpark0

12/11/2017 at 03:16AM

69
#>228 - Bruce Park / @bpark0

12/11/2017 at 03:06AM