Skip to content

Instantly share code, notes, and snippets.

@juhasz
Created April 11, 2012 09:54
Show Gist options
  • Save juhasz/2358317 to your computer and use it in GitHub Desktop.
Save juhasz/2358317 to your computer and use it in GitHub Desktop.
VIM: split and align SQL queries - a quick way
s/, /,\r / | '{,.s/ FROM/\rFROM/ | '{,'}s/ JOIN/\r JOIN/ | s/ WHERE/\rWHERE/ | s/ AND/\r AND/ | '{,'}s/ ORDER/\rORDER/ | '{,'}s/ LIMIT/\rLIMIT/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment