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

Cleanining up 80 column concatenated text

1. Put the whole query on one line, remove the concatenation operators 2. Remove the double spaces that appear a few times in the query 3. Use string-interpolated variable statementPid rather than the ugly concatenation

Start file
$atres = sqlStatement("select f.name,f.street,f.city,f.state,f.postal_code from facility f " .
  " left join users u on f.id=u.facility_id " .
  " left join  billing b on b.provider_id=u.id and b.pid = '".$stmt['pid']."' " .
  " where  service_location=1");
$row = sqlFetchArray($atres);
End file
$atres = sqlStatement("select f.name,f.street,f.city,f.state,f.postal_code from facility f left join users u on f.id=u.facility_id left join billing b on b.provider_id=u.id and b.pid = $statementPid where service_location=1");
$row = sqlFetchArray($atres);

View Diff

1,4c1
< $atres = sqlStatement("select f.name,f.street,f.city,f.state,f.postal_code from facility f " .
<   " left join users u on f.id=u.facility_id " .
<   " left join  billing b on b.provider_id=u.id and b.pid = '".$stmt['pid']."' " .
<   " where  service_location=1");
---
> $atres = sqlStatement("select f.name,f.street,f.city,f.state,f.postal_code from facility f left join users u on f.id=u.facility_id left join billing b on b.provider_id=u.id and b.pid = $statementPid where service_location=1");

Solutions by @jjpiche:

Unlock 8 remaining solutions by signing in and submitting your own entry
Created by: @Salshammath

76 active golfers, 188 entries

Solutions by @jjpiche:
31
#4 - Joseph J. Piché / @jjpiche

08/25/2012 at 11:58PM

32
#>11 - Joseph J. Piché / @jjpiche

08/25/2012 at 11:54PM

33
#>24 - Joseph J. Piché / @jjpiche

08/25/2012 at 11:49PM

36
#>30 - Joseph J. Piché / @jjpiche

08/25/2012 at 11:46PM

39
#>33 - Joseph J. Piché / @jjpiche

08/25/2012 at 11:44PM

45
#>48 - Joseph J. Piché / @jjpiche

08/25/2012 at 11:42PM

48
#>56 - Joseph J. Piché / @jjpiche

08/25/2012 at 11:41PM

55
#>70 - Joseph J. Piché / @jjpiche

08/25/2012 at 11:38PM