haskeline
haskeline copied to clipboard
Add vi mode indicator
Readline has an option: show-mode-in-prompt
that works with editing-mode vi
to give an indicator of the vi editing mode, in the form of the leftmost prompt character showing a '+' in insert mode, and ':' in normal mode, (it removes the character all-together when doing a search with /, I guess if it supports other command-mode commands, it would do the same thing)
It would be great if I could get this in my ghci.. That being said, just because readline does it this way, doesn't mean it makes more sense than having something customizable in the configuration of the prompt itself. Any thoughts?
That sounds like a reasonable addition to the existing UserPreferences. I probably won't have time to implement it anytime soon, though. Let me know if you're interested in doing it an/or would like pointers around the codebase. (The printing of the prompt is controlled by System.Console.Haskeline.LineState
.)
How (i.e. where) are entries from the .haskeline
dotfile parsed inside Haskeline?
They're parsed as part of System.Console.Haskeline.Prefs.readPrefs; the full list of prefs is defined here: http://hackage.haskell.org/package/haskeline-0.7.2.3/docs/src/System.Console.Haskeline.Prefs.html#settors
This would be a very useful feature. I'm very used to being able to see what mode fish shell is in and having that in GHCI would be helpful.
Is there a way to change cursor shapes for different vi modes? I have that with zsh like so. For me, this was intuitive enough where you don't need any other indicator.
Any updates on this?