Skip to content

Instantly share code, notes, and snippets.

@midnightcodr
Created January 24, 2026 18:51
Show Gist options
  • Select an option

  • Save midnightcodr/0acb546f8f21792b0c9696e1bb0e2d58 to your computer and use it in GitHub Desktop.

Select an option

Save midnightcodr/0acb546f8f21792b0c9696e1bb0e2d58 to your computer and use it in GitHub Desktop.
turn on vi mode with indicator in bash
# Enable vi editing mode
set editing-mode vi
# Show the mode indicator in the prompt (requires Bash >= 4.3)
set show-mode-in-prompt on
# Customize the indicator strings (optional)
# The \1 and \2 wrap non-printable characters (like color codes)
set vi-ins-mode-string "(ins) "
set vi-cmd-mode-string "(cmd) "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment