From 184c7f7f4844f792628d6dab038194acb755f6d8 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 20 Sep 2016 03:07:33 -0500 Subject: [PATCH] fix ctrl-p at terminal prompt --- env/sh/bashrc | 6 ++++++ env/sh/inputrc | 4 ++++ env/sh/tmux.conf | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/env/sh/bashrc b/env/sh/bashrc index 3079386..248c828 100644 --- a/env/sh/bashrc +++ b/env/sh/bashrc @@ -173,4 +173,10 @@ if [ -t 0 ]; then if [ "$PWD" = "$HOME" ]; then cd "$HOME/.." fi + + # vi modes in the terminal prompt + set -o vi + + # except we still want some things to work the old fashioned way + bind '"\C-p": history-search-backward' fi diff --git a/env/sh/inputrc b/env/sh/inputrc index dd873d5..1cb6b03 100644 --- a/env/sh/inputrc +++ b/env/sh/inputrc @@ -1,2 +1,6 @@ "\eOd": backward-word "\eOc": forward-word + +$if editing-mode=vi + "\C-p": history-search-backward +$endif diff --git a/env/sh/tmux.conf b/env/sh/tmux.conf index abeea8a..42a7b2b 100644 --- a/env/sh/tmux.conf +++ b/env/sh/tmux.conf @@ -64,6 +64,10 @@ set -g @plugin 'tmux-plugins/tmux-sessionist' # enable continuum set -g @continuum-restore 'on' +# let continuum startup on boot +set -g @continuum-boot 'on' + # initialize tmux plugin manager run '~/.tmux/plugins/tpm/tpm' +unbind-key C-p