Skip to main content
Commonmark migration
Source Link

#Vim, 18 bytes

Vim, 18 bytes

Well now that I realized this is possible, I'm kinda embarrassed by my 26 byte V answer, especially since V is supposed to be shorter than vim. But this is pretty much a builtin.

:sor i/\(The \)*/<CR> 

Explanation (straight from vim help):

 *:sor* *:sort* :[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/] Sort lines in [range]. When no range is given all lines are sorted. With [i] case is ignored. When /{pattern}/ is specified and there is no [r] flag the text matched with {pattern} is skipped, so that you sort on what comes after the match. Instead of the slash any non-letter can be used. 

#Vim, 18 bytes

Well now that I realized this is possible, I'm kinda embarrassed by my 26 byte V answer, especially since V is supposed to be shorter than vim. But this is pretty much a builtin.

:sor i/\(The \)*/<CR> 

Explanation (straight from vim help):

 *:sor* *:sort* :[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/] Sort lines in [range]. When no range is given all lines are sorted. With [i] case is ignored. When /{pattern}/ is specified and there is no [r] flag the text matched with {pattern} is skipped, so that you sort on what comes after the match. Instead of the slash any non-letter can be used. 

Vim, 18 bytes

Well now that I realized this is possible, I'm kinda embarrassed by my 26 byte V answer, especially since V is supposed to be shorter than vim. But this is pretty much a builtin.

:sor i/\(The \)*/<CR> 

Explanation (straight from vim help):

 *:sor* *:sort* :[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/] Sort lines in [range]. When no range is given all lines are sorted. With [i] case is ignored. When /{pattern}/ is specified and there is no [r] flag the text matched with {pattern} is skipped, so that you sort on what comes after the match. Instead of the slash any non-letter can be used. 
Source Link
DJMcMayhem
  • 60.1k
  • 18
  • 203
  • 352

#Vim, 18 bytes

Well now that I realized this is possible, I'm kinda embarrassed by my 26 byte V answer, especially since V is supposed to be shorter than vim. But this is pretty much a builtin.

:sor i/\(The \)*/<CR> 

Explanation (straight from vim help):

 *:sor* *:sort* :[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/] Sort lines in [range]. When no range is given all lines are sorted. With [i] case is ignored. When /{pattern}/ is specified and there is no [r] flag the text matched with {pattern} is skipped, so that you sort on what comes after the match. Instead of the slash any non-letter can be used.