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

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

221 active golfers, 801 entries

Solutions by @adamgbell:
30
#2 - Adam Bell / @adamgbell

03/30/2013 at 04:06PM

31
#>26 - Adam Bell / @adamgbell

03/30/2013 at 03:56PM

31
#>26 - Adam Bell / @adamgbell

03/30/2013 at 03:58PM

32
#>59 - Adam Bell / @adamgbell

03/30/2013 at 03:51PM

33
#>68 - Adam Bell / @adamgbell

03/30/2013 at 03:43PM

34
#>77 - Adam Bell / @adamgbell

03/30/2013 at 03:39PM

35
#>93 - Adam Bell / @adamgbell

03/30/2013 at 03:22PM

35
#>93 - Adam Bell / @adamgbell

03/30/2013 at 03:38PM

36
#>108 - Adam Bell / @adamgbell

03/30/2013 at 01:47PM

36
#>108 - Adam Bell / @adamgbell

03/30/2013 at 01:52PM

37
#>124 - Adam Bell / @adamgbell

03/30/2013 at 01:27PM

37
#>124 - Adam Bell / @adamgbell

03/30/2013 at 03:26PM

38
#>146 - Adam Bell / @adamgbell

03/30/2013 at 01:46PM

38
#>146 - Adam Bell / @adamgbell

03/30/2013 at 03:18PM

38
#>146 - Adam Bell / @adamgbell

03/30/2013 at 03:31PM

39
#>163 - Adam Bell / @adamgbell

03/30/2013 at 01:37PM

39
#>163 - Adam Bell / @adamgbell

03/30/2013 at 01:44PM

40
#>177 - Adam Bell / @adamgbell

03/30/2013 at 01:35PM

46
#>203 - Adam Bell / @adamgbell

03/30/2013 at 03:15PM