From e8672335288a6fc9dda749216508f3a7d3f25d68 Mon Sep 17 00:00:00 2001 From: Michael Barlow Date: Tue, 16 Jun 2015 10:00:09 +1000 Subject: [PATCH 1/2] Added a suggestion for GNU readline Added a suggestion to set the editing mode for bash to vi. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3a094e2..334f220 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,8 @@ Scope: - In bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete the whole line. Use **alt-Left** and **alt-Right** to move by word, and **ctrl-k** to kill to the end of the line. See `man readline` for all the default keybindings in bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. +- Alternatively, add `set editing-mode vi` to your `~/.bashrc` to enable vim-keybindings for bash (and any program using GNU readline). + - To go back to the previous working directory: `cd -` - If you are halfway through typing a command but change your mind, hit **alt-#** to add a `#` at the beginning and enter it as a comment (or use **ctrl-a**, **#**, **enter**). You can then return to it later via command history. From f2761fe47cc9b4b4a3709dfe667a7272696569e2 Mon Sep 17 00:00:00 2001 From: Michael Barlow Date: Tue, 16 Jun 2015 12:13:48 +1000 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 334f220..47ffbb2 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Scope: - In bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete the whole line. Use **alt-Left** and **alt-Right** to move by word, and **ctrl-k** to kill to the end of the line. See `man readline` for all the default keybindings in bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. -- Alternatively, add `set editing-mode vi` to your `~/.bashrc` to enable vim-keybindings for bash (and any program using GNU readline). +- Alternatively, add `set -o vi` to your `~/.bashrc` to enable vim-keybindings for bash. - To go back to the previous working directory: `cd -`