summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-11 12:57:51 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-08-11 12:57:51 +0200
commit2d8bc8fb87031b00ade9939e74bdeb521f504108 (patch)
tree123bcf573e5cff256e28a9bf5eaf32eb8b8b58b9 /.config
parent5285137fcbe827ed9b6bb6f16bbe5459f96bf1e4 (diff)
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.
Diffstat (limited to '.config')
-rw-r--r--.config/readline/inputrc8
1 files changed, 8 insertions, 0 deletions
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