diff options
Diffstat (limited to 'fedora/.config/bash/scripts.bash')
| -rw-r--r-- | fedora/.config/bash/scripts.bash | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fedora/.config/bash/scripts.bash b/fedora/.config/bash/scripts.bash index 76644e3..400265d 100644 --- a/fedora/.config/bash/scripts.bash +++ b/fedora/.config/bash/scripts.bash @@ -155,6 +155,24 @@ mkdt() { ########################################################################################### ########################################################################################### +### --- CURSOR --- ### +# vi-mode cursor change +function update_cursor { + if [[ $READLINE_LINE == * ]]; then + if [[ $READLINE_POINT -eq 0 ]]; then + echo -ne '\e[6 q' # insert mode + else + echo -ne '\e[2 q' # command mode + fi + fi +} + +# vi-command, vi-insert 모드 hook 등록 +bind -m vi-insert '":": "\C-o update_cursor"' +bind -m vi-command '":": "\C-o update_cursor"' + +########################################################################################### +########################################################################################### ### --- DISTRIBUTION --- ### # Show the current distribution distribution() { |
