Skip to content

Comment on Ask HN: Looking for a Programable Text Editor

Comments

Since vom and emacs were already proposed, there is a third classic in this round: Shell programming. Typically you have $EDITOR env set (to something like nano, vim, emacs, gedit, kwrite, etc) and then can include it in your script as in

   echo stuff >> worklog
   $EDITOR worklog && mailto someone
etc

If you want to handle `$EDITOR` not being set, at least in bash, you can use one of it's parameter expansion features:

    ${EDITOR:-vim}
Will use vim if `$EDITOR` is unset.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.