PICO as default editor?

software development

#1

I was just on telnet to edit my crontab and found that I couldn’t operate the editor… The screen had a column of blue $ signs on the left edge, and pretty much nothing else. I’m not a Unix expert so I was pretty lost! I only know PICO.

This recent thread gave me a hint about how to set PICO instead of that other editor (what was it, anyway?) by entering the command export VISUAL=“pico -w”, but that setting is gone when I open telnet the next time.

How can I set my account so that PICO is the default editor when I log into my telnet?

(I know VIM (and other editors) is much better, everybody says so and I am not going to argue against that. But I really only need telnet once or twice a year and that’s why I need PICO because it keeps the available commands (save, quit, etc.) on-screen.)

TorbenGB
Try out DreamHost with a free WebIDPrices, options


#2

Make a file called .bash_profile in your /home/username (also known as ~) directory if you don’t have one already.

And put export VISUAL=“pico -w” at the end.

I would suggest:
export VISUAL="pico -w"
export EDITOR=“pico -w”


#3

.bash_profile was the answer – thanks Jason! I didn’t even know such a file existed. Now I do.

TorbenGB
Try out DreamHost with a free WebIDPrices, options


#4

man bash from the command line.
Tons of information, absolutely tons :-).
Helped me customize my environment quite well.

Also, you can’t go wrong with The Linux Documentation Project either.
(Search for “bash” on the right hand side.)