technomancy / grenchman

Sorry about the name
GNU General Public License v3.0
217 stars 8 forks source link

~/.inputrc setting 'set editing-mode vi' ignored #36

Open bwagner opened 8 years ago

bwagner commented 8 years ago

~/.inputrc setting 'set editing-mode vi' ignored, even if it seems to be working for other programs, i.e. bash.

Mac OS X: 10.11.6 (El Capitan) grenchman 0.2.0 Leiningen 2.6.1 on Java 1.8.0_05

WillChilds-Klein commented 6 years ago

i've found that rlwrap (available via homebrew) provides a viable workaround for this issue. my ~/.inputrc:

set completion-ignore-case on
set editing-mode vi
$if mode=vi
    set keymap vi-command
    set keymap vi-insert
    "\C-l": "\e\C-la"
    "jk": vi-movement-mode 
$endif

I invoke grench like so:

$ rlwrap -a placeholder -t dumb grench repl

apparently, some placeholder argument is required for -a on OSX's distribution of rlwrap, but not on linux's...

this is the only solution I've found that gives both lein repl and grench repl the keybindings specified in my inputrc, which I get for free with bash, cpython, and other readline-native interpreters.

the Clojure Programming wiki book's "Getting Started" section initially pointed me in this direction.