title: Sublime Text 3: How to do multi-line selection that excludes blank lines?
body: <p>I have some scripts in Stata written as follows:</p>
  
  <pre><code>* 1. count of firms in each bin
  grouplabs Inear_dist_km_0_10 Inear_dist_km_10_30 Inear_dist_km_30_60 Inear_dist_km_60_100 Inear_dist_km_100_150 Inear_dist_km_morethan150, groupvar(Inear_dist_km_gr) emptylabel(empty)
  graph hbar (count) if Inear_dist_km_gr !=1, over(Inear_dist_km_gr) name(n1)
  
  * 2. count of firms in each bin (bigger bins)
  grouplabs Inear_dist_km_0_20_v2 Inear_dist_km_20_40_v2 Inear_dist_km_40_60_v2 Inear_dist_km_morethan60_v2, groupvar(Inear_dist_km_v2_gr) emptylabel(empty)
  graph hbar (count) if Inear_dist_km_v2_gr !=1, over(Inear_dist_km_v2_gr) name(n2)
  
  * 3. GGK firm level bins
  grouplabs Inear_dist_km_GGK_0_10 Inear_dist_km_GGK_10_50 Inear_dist_km_GGK_morethan50, groupvar(Inear_dist_km_GGK_gr) emptylabel(empty)
  graph hbar (count) if Inear_dist_km_GGK_gr !=1, over(Inear_dist_km_GGK_gr) name(n3)
  </code></pre>
  
  <p>I need to add the character <code>;</code> at the end of each line, but not in the blank lines between each script. I have tried the Split into Lines trick to get multiple cursors at the end of each line, but the selection also includes the empty lines in between. This results in </p>
  
  <pre><code>* 1. count of firms in each bin;
  grouplabs Inear_dist_km_0_10 Inear_dist_km_10_30 Inear_dist_km_30_60 Inear_dist_km_60_100 Inear_dist_km_100_150 Inear_dist_km_morethan150, groupvar(Inear_dist_km_gr) emptylabel(empty);
  graph hbar (count) if Inear_dist_km_gr !=1, over(Inear_dist_km_gr) name(n1);
  ;
  * 2. count of firms in each bin (bigger bins);
  grouplabs Inear_dist_km_0_20_v2 Inear_dist_km_20_40_v2 Inear_dist_km_40_60_v2 Inear_dist_km_morethan60_v2, groupvar(Inear_dist_km_v2_gr) emptylabel(empty);
  graph hbar (count) if Inear_dist_km_v2_gr !=1, over(Inear_dist_km_v2_gr) name(n2);
  ;
  * 3. GGK firm level bins;
  grouplabs Inear_dist_km_GGK_0_10 Inear_dist_km_GGK_10_50 Inear_dist_km_GGK_morethan50, groupvar(Inear_dist_km_GGK_gr) emptylabel(empty);
  graph hbar (count) if Inear_dist_km_GGK_gr !=1, over(Inear_dist_km_GGK_gr) name(n3);
  </code></pre>
  
  <p>How can I exclude the empty lines from the selection so that only lines with characters in it will have <code>;</code> at the end? I appreciate your help.</p>