Simple plugin for formatting SQL using sqlparse.
Inspired by https://github.com/chaosong/orz-scripts/tree/master/vim-sql-formatter
python, sqlparse, vim with python or neovim
sudo pip install sqlparse
Include line to your .vimrc:
NeoBundle 'mpyatishev/vim-sqlformat'
Plugin sets formatexpr
for filetype sql
, so just use gq
for format SQL.