Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It should be noted that a lot of Linux/Unix programs still support the variables EDITOR and VISUAL.

export VISUAL=vim

Will make those program use com as the default editor. I believe for works that way for example.



You might want VISUAL=view instead of VISUAL=vim, which will open vim in read-only mode (which is in line with the semantics of VISUAL).


Hmm, `man 7 environ` on Linux says “The user's preferred utility to edit text files”, which matches my long-term understanding. The original distinction between `EDITOR` and `VISUAL` was that the latter need not work on a printing terminal. The name `VISUAL` comes from the `ex` command `:visual` — i.e, vi.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: