From 2d8bc8fb87031b00ade9939e74bdeb521f504108 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 11 Aug 2023 12:57:51 +0200 Subject: readline: Change cursor shape based on vi-mode This commit causes the cursor to be a block when in normal mode and a pipe when in insert mode for all applications using GNU readline. I also just went ahead and set the default mode to vi because I can. --- .config/readline/inputrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/readline/inputrc b/.config/readline/inputrc index a1aee6a..500d0b4 100644 --- a/.config/readline/inputrc +++ b/.config/readline/inputrc @@ -1 +1,9 @@ +set editing-mode vi + +$if editing-mode == vi + set show-mode-in-prompt on + set vi-ins-mode-string "\1\e[5 q\2" + set vi-cmd-mode-string "\1\e[2 q\2" +$endif + "\C-l": clear-screen -- cgit v1.2.3