TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Improve your PostgreSQL workflow with vim and dbext

3 点作者 jmsmistral超过 9 年前

2 条评论

cadiolis超过 9 年前
Some other tips for using vim and dbext.<p>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.<p>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<p>3. Variables in psql are super handy. See the examples in my psqlrc but for example I can execute `:ps` in vim&#x2F;dbext and it runs the query I have defined against against the &#x27;ps&#x27; variable in my psqlrc which is a query similar to the pgAdmin server status window<p>4. Recommend <a href="https:&#x2F;&#x2F;github.com&#x2F;krisajenkins&#x2F;vim-postgresql-syntax" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;krisajenkins&#x2F;vim-postgresql-syntax</a> for syntax highlighting on psql output. See the function DBextPostResult in my vimrc (in dotfiles below) on how to enable.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;collinpeters&#x2F;dotfiles&#x2F;blob&#x2F;master&#x2F;psql&#x2F;psqlrc.symlink" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;collinpeters&#x2F;dotfiles&#x2F;blob&#x2F;master&#x2F;psql&#x2F;ps...</a>
评论 #11043322 未加载
domnaban超过 9 年前
That&#x27;s pretty neat!