Need color on my text editor (pico) - xterm

Posted on 2009-02-19
Last Modified: 2012-05-06

I would like to have color in my text editor for programs I have to write in school. I login to the system vi putty and use xterm but I cannot get it to work. How can I use xterm to have color in my text editor(pico) for c++ code and assemble(SAL, MAL)? If the UNIX machine has support for different terminal emulators I will use them but I don't what support it has other than vt100 and xterm.

Question by:waffe
    LVL 61

    Accepted Solution

    PICO is part of PINE, it is black and white + underscore + bold
    Is vim or emacs a solution?
    LVL 51

    Assisted Solution

    traditional vi has no colours, you need to use vim (which is an alias to vi on most systems)
    In your shell you need to set the TERM environment variable to for example xterm-color

    Author Comment

    Thanks for response, but I am still having problems. When I log into the UNIX machine I get a prompt that says:
    TERM = (unknown)

    I am able to type xterm but not xterm-color. I get this error when I do:
    Type xterm-color unknown

    I then try xterm when I log in and I get this error:
     xterm Xt error: Can't open display:


    Author Comment

    Ok, this is how it is done, at least in my case

    you have to use xterm for the terminal and once you are in vim, you must type":syntax enable" and presto! there is color.

    Thanks for the help!
    LVL 51

    Expert Comment

    > .. I get this error when I do ..
    TERM is an environment variable, depending on your shell you set it with
      setenv TERM xterm-color

    then you start your editor, i.e. vi

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
    This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now