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 @jpiasetz:

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

224 active golfers, 820 entries

Solutions by @jpiasetz:
31
#23 - John Piasetzki / @jpiasetz

07/13/2012 at 04:55AM

31
#>23 - John Piasetzki / @jpiasetz

07/13/2012 at 04:57AM

32
#>58 - John Piasetzki / @jpiasetz

07/13/2012 at 04:54AM

33
#>70 - John Piasetzki / @jpiasetz

07/13/2012 at 04:51AM

34
#>77 - John Piasetzki / @jpiasetz

07/13/2012 at 04:38AM

34
#>77 - John Piasetzki / @jpiasetz

07/13/2012 at 04:48AM

35
#>94 - John Piasetzki / @jpiasetz

07/13/2012 at 04:36AM

36
#>107 - John Piasetzki / @jpiasetz

07/13/2012 at 04:33AM

37
#>125 - John Piasetzki / @jpiasetz

07/13/2012 at 04:29AM

38
#>145 - John Piasetzki / @jpiasetz

07/13/2012 at 04:24AM

39
#>163 - John Piasetzki / @jpiasetz

07/13/2012 at 04:18AM

39
#>163 - John Piasetzki / @jpiasetz

07/13/2012 at 04:20AM

40
#>177 - John Piasetzki / @jpiasetz

07/13/2012 at 04:16AM