I am using oh-my-zsh's vi-mode plugin. Its working awesomely for regular terminal usage.
How to extend this vi-mode to psql, irb etc?
In bash I used to do this by adding commands in .inputrc
I am using mac os sierra
Its the zsh shell which uses zle instead of readline
Rest of the terminal apps still use readline even if they are invoked via zsh
Hence .inputrc works here for all the apps