How can I get vi editing mode to work in GHCi?
I'm using version 7.10.3.
I tried Prelude> :set editor vi
, but to no effect.
I also have these lines in my ~/.inputrc
.
set editing-mode vi
set keymap vi
.
How can I get vi editing mode to work in GHCi?
I'm using version 7.10.3.
I tried Prelude> :set editor vi
, but to no effect.
I also have these lines in my ~/.inputrc
.
set editing-mode vi
set keymap vi
.
GHCi now uses the Haskeline library for command line editing (which has been true for quite a while now), and it does indeed have a vi mode. The configuration file is ~/.haskeline
and the line you want is:
editMode: Vi
Documented here: https://github.com/judah/haskeline/wiki/UserPreferences
This works without any issues on MacOS with The Glorious Glasgow Haskell Compilation System, version 9.4.3
ghci> :set editor vi
ghci> :edit <yourfilename>