# .editrc is used by editline(3), editrc(5)
#
# inputrc -- readline config for rlwrap(1) for ed(1) usage
# $include ~/.config/readline/inputrc

# vi-mode
bind -v
# edit on
# history unique 1

# press <esc>-v to open current line in $EDITOR.
# press <esc>-: to enter libedit command mode.
bind \\t rl_complete

python:bind '^I' rl_complete
lldb:bind '^I' lldb_complete

# bind '^R' em-inc-search-prev
# bind '^S' em-inc-search-next
# bind '^Q' em-lower-case
# bind '^Y' em-yank
# see: https://blog.segment7.net/articles/2009/08/11/vi-bindings-for-irb-on-os-x
# Control-n: menu-complete
# TAB: self-insert

bind '^[[1;5C' vi-next-word
bind '^[[1;5D' vi-prev-word
bind '^B' ed-command
bind '^D' ed-delete-next-char
#bind '^D' vi-list-or-eof
bind '^E' ed-move-to-end
bind '^H' vi-delete-prev-char
bind '^I' ed-prev-line
bind '^J' ed-newline
bind '^I' ed-next-line
bind '^L' ed-clear-screen
bind '^N' ed-search-next-history
bind '^P' ed-search-prev-history
bind '^R' ed-redisplay
bind '^U' vi-kill-line-prev
bind '^V' ed-quoted-insert
bind '^W' ed-delete-prev-word
bind '^Y' vi-yank
bind '^Z' ed-kill-line
#bind '\E[3~' ed-delete-prev-word    # delete
#bind '\EOD' vi-prev-word            # kp_left
#bind '\EOC' vi-next-word            # kp_right
#bind '\E[1;5D' vi-prev-word         # ctrl_left
#bind '\E[1;5C' vi-next-word         # ctrl_right
#bind '\E[C' ed-next-char            # right
#bind '\E[D' ed-prev-char            # left
#bind '\E[4~' ed-end-of-file         # end
#bind '\E[5~' ed-search-next-history # pg_up
#bind '\E[6~' ed-search-prev-history # pg_down
