Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

psql client auto completion in edit mode using vi

In psql client, you can enter input edit mode with \e, witch calls an editor, witch in my case is vim (similar to ctrl+x-ctrl+e in bash). Is there a way to achieve same syntax auto completion capabilities in this edit mode as simply typing in psql gives (autocompletion support for syntax and object names like tables, schemes, sequences, types and etc... )?

like image 898
Ben Avatar asked Mar 03 '26 02:03

Ben


1 Answers

Have you searched vim.org?

  • dbext.vim provides (among other features) completion:

dbext ties into Vim dictionary feature. You can complete table names, procedure names and view names using the i_CTRL-X_CTRL-K feature

  • psql.vim provides syntax highlighting. The script is quite old, though; don't know whether all keywords are supported
like image 89
Ingo Karkat Avatar answered Mar 05 '26 05:03

Ingo Karkat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!