2

psql, the PostgreSQL CLI, uses readline for it's user interface. Readline allows both emacs- and vi editing mode, and psql uses emacs mode by default. I, on the other hand, use vi for everything; is there a command for setting vi editing mode in psql?

1 Answer 1

4

You just have to configure readline appropriately. Create a file .inputrc in your home directory with the following content:

set editing-mode vi
1
  • This is obiously the answer! Thx
    – j4nd3r53n
    Nov 21, 2021 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.