Re: Default editor - how is it set?
Freeman <[email protected]> Tue, 2 Feb 2010 14:31:44 -0800
| Newsgroups | gmane.network.tin.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Feb 02, 2010 at 06:21:49PM +0000, Chris G wrote:
> For some reason my copy of tin has started selecting nano as my editor
> instead of vi. I have never had either EDITOR or VISUAL set in my
> environment so I'm at a loss to understand why it has changed.
>
> How does tin decide what editor to use?
>
> The only thing I can think of that has changed recently which might
> affect this is that I have moved vi from /usr/local/bin to /usr/bin.
>
> Any suggestions welcome.
>
(Hallelujah! I have been subscribed for 6 weeks or so and this is the first
list mail I have seen!)
I wonder if nano is in /usr/local/bin?
I would think but I don't know that tin looks at your environment first then
starts search your path. Maybe it searches /local/bin before /usr/bin.
How about adding it to your .bashrc or whatever you use?
A line or two such as
Editor=vim; export EDITOR
or
if [ x$DISPLAY != x ]; then
EDITOR=gvim; export EDITOR
else
EDITOR=vim; export EDITOR
fi
Any way. Thanks for the post! :)
--
Kind Regards,
Freeman