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
;
and ,
commands to repeat f
or F
commands in one or the other direction do not work... –
Spermiogenesis 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>
© 2022 - 2025 — McMap. All rights reserved.
:set editor vi
, what happens when you try to:edit
a file? What do you mean "to no effect"? – Pancreatin