3 ms·
Improve your PostgreSQL workflow with vim and dbext
- domnaban 11y agoThat's pretty neat!
- cadiolis 11y agoSome other tips for using vim and dbext. 1. Since it is using psql, you can run things like `\dt` to show a list of tables. See the psql docs for all the commands available. 2. your .psqlrc is now your friend. Check my psqlrc for some ideas [1]. For example I use `\pset null ¤` to render nulls and also `\pset linestyle unicode` and `\pset border 2` for better table rendering 3. Variables in psql are super handy. See the examples in my psqlrc but for example I can execute `:ps` in vim/dbext and it runs the query I have defined against against the 'ps' variable in my psqlrc which is a query similar to the pgAdmin server status window 4. Recommend https://github.com/krisajenkins/vim-postgresql-syntax https://github.com/krisajenkins/vim-postgresql-syntax for syntax highlighting on psql output. See the function DBextPostResult in my vimrc (in dotfiles below) on how to enable. [1] https://github.com/collinpeters/dotfiles/blob/master/psql/psqlrc.symlink https://github.com/collinpeters/dotfiles/blob/master/psql/ps...
- jmsmistral 11y agoCheers for the valuable tips! I'll be adding these to the page with due credit :)