[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1258
  • Last Modified:

Need color on my text editor (pico) - xterm

Hi,

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.

Thanks,
waffe  
0
waffe
Asked:
waffe
  • 2
  • 2
2 Solutions
 
gheistCommented:
PICO is part of PINE, it is black and white + underscore + bold
Is vim or emacs a solution?
0
 
ahoffmannCommented:
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
0
 
waffeAuthor Commented:
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:

thanks,
waffe
0
 
waffeAuthor Commented:
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!
0
 
ahoffmannCommented:
> .. I get this error when I do ..
TERM is an environment variable, depending on your shell you set it with
  setenv TERM xterm-color
or
  TERM=xterm-color

then you start your editor, i.e. vi
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now