Prettysql Use sqlparse to automatically format handcrafted SQL in vim. Requirements You need the sqlparse module from pypi Formatting SQL statements Format SQL statements by visually selecting them and pressing <leader>fs