argumentcomputer / lurk

Lurk is a Turing-complete programming language for zk-SNARKs. It is a statically scoped dialect of Lisp, influenced by Scheme and Common Lisp.
https://docs.argument.xyz
MIT License
47 stars 3 forks source link

Vi mode #384

Closed gabriel-barrett closed 2 weeks ago

gabriel-barrett commented 2 weeks ago

Sets the repl to vi mode when $EDITOR is either "vi", "vim" or "nvim"

arthurpaulino commented 2 weeks ago

Ah, the flag should be LURK_EDITOR

gabriel-barrett commented 2 weeks ago

Ah, the flag should be LURK_EDITOR

That would be unergonomic, since EDITOR is a standard environment variable that people usually already set in their shell config file. What I can do is add it (or something like LURK_EDITOR_MODE) as an alternative env variable taking precedence over EDITOR

EDIT: The most ergonomic way would be for rustyline to be able to read .inputrc, in my opinion. But it can't so I went with reading a standard env var

arthurpaulino commented 2 weeks ago

If that's a standard env var for which "clashing" is wanted, then it's okay