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

224 active golfers, 820 entries

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

03/30/2013 at 04:06PM

31
#>28 - Adam Bell / @adamgbell

03/30/2013 at 03:56PM

31
#>28 - Adam Bell / @adamgbell

03/30/2013 at 03:58PM

32
#>61 - Adam Bell / @adamgbell

03/30/2013 at 03:51PM

33
#>70 - Adam Bell / @adamgbell

03/30/2013 at 03:43PM

34
#>79 - Adam Bell / @adamgbell

03/30/2013 at 03:39PM

35
#>95 - Adam Bell / @adamgbell

03/30/2013 at 03:22PM

35
#>95 - Adam Bell / @adamgbell

03/30/2013 at 03:38PM

36
#>110 - Adam Bell / @adamgbell

03/30/2013 at 01:47PM

36
#>110 - Adam Bell / @adamgbell

03/30/2013 at 01:52PM

37
#>126 - Adam Bell / @adamgbell

03/30/2013 at 01:27PM

37
#>126 - Adam Bell / @adamgbell

03/30/2013 at 03:26PM

38
#>148 - Adam Bell / @adamgbell

03/30/2013 at 01:46PM

38
#>148 - Adam Bell / @adamgbell

03/30/2013 at 03:18PM

38
#>148 - Adam Bell / @adamgbell

03/30/2013 at 03:31PM

39
#>165 - Adam Bell / @adamgbell

03/30/2013 at 01:37PM

39
#>165 - Adam Bell / @adamgbell

03/30/2013 at 01:44PM

40
#>179 - Adam Bell / @adamgbell

03/30/2013 at 01:35PM

46
#>205 - Adam Bell / @adamgbell

03/30/2013 at 03:15PM