title: Is it possible to sort a groups of lines in vim?
body: <p>As far as I know vim's :sort method will sort each line. I have some code that is in groups of 3 lines. How can I sort this? Please ignore the shitty code, it's a legacy app :'(</p>
  
  <p>I would like to sort by the case 'AF' line but ignore (group) the country and break line</p>
  
  <pre><code>case 'AF':
    country = 'Afghanistan';
    break;,
  case 'AL':
    country = 'Albania';
    break;,
  case 'DZ':
    country = 'Algeria';
    break;,
  case 'AS':
    country = 'American Samoa';
    break;,
  case 'AD':
    country = 'Andorra';
    break;,
  case 'AO':
    country = 'Angola';
    break;,
  case 'AI':
    country = 'Anguilla';
    break;,
  case 'AQ':
    country = 'Antarctica';
    break;,
  case 'AG':
    country = 'Antigua And Barbuda';
    break;,
  case 'AR':
    country = 'Argentina';
    break;,
  case 'AM':
    country = 'Armenia';
    break;,
  case 'AW':
    country = 'Aruba';
    break;,
  case 'AU':
    country = 'Australia';
    break;,
  case 'AT':
    country = 'Austria';
    break;,
  case 'AZ':
    country = 'Azerbaijan';
    break;,
  case 'BS':
    country = 'Bahamas';
    break;,
  case 'BH':
    country = 'Bahrain';
    break;,
  case 'BD':
    country = 'Bangladesh';
    break;,
  case 'BB':
    country = 'Barbados';
    break;,
  case 'BY':
    country = 'Belarus';
    break;
  </code></pre>