Forum

Notifications
Clear all

Ansi Color

0 Posts
2 Users
0 Reactions
275 Views
(@CanMike)
Eminent Member
Joined: 20 years ago
Posts: 13
Topic starter  

Is there any way to modified ANSI color. Here's my problem.

I use Absolute Telnet to connect to my Linux box then vi to modify scripts. My foreground colour is R192 G192 B192 (gray) and background colour R0 G0 B0 (black). When I modify a script the colour of comments/debug command is a blue that is just about impossible to see.

Can I just turn-off ANSI Colors? Please.

[size=1][ September 22, 2005, 02:51 PM: Message edited by: Brian T. Pence ][/size]


   
ReplyQuote
(@bpence)
Member Admin
Joined: 1 year ago
Posts: 1375
 

Do you want to turn it off or do you want to make it work?

I assume you're not using the standard 'vi' package, as stock 'vi' does not usually support colors and syntax highlighting. If you're using 'vim', the really cool 'vi' replacement, then the fix is easy... Once in vi, enter the following command:

:set background=dark

This will optimize the color settings for a dark background.

Conversely, if you have a light or white background, you would use this command...

:set background=light

If you're using another vi package, let me know and I'll do some more research.

Brian


   
ReplyQuote
(@CanMike)
Eminent Member
Joined: 20 years ago
Posts: 13
Topic starter  

Amazing! Yup, VIM is the standard 'vi' packaged with Red Hat Enterprise Linux 4.

I followed your suggestion and now I can modify my scripts without colour problems.

Now all I have to figure out is how to include the command in my vim config file.

Regards and Thanks for the prompt reply
Mike Parish, Toronto, Canada


   
ReplyQuote
(@bpence)
Member Admin
Joined: 1 year ago
Posts: 1375
 

just add the command just like I showed you to your .vimrc file. Here's mine:

[btpence@gateway btpence]$ cat .vimrc
 :syntax enable
 :set  background=dark
 [btpence@gateway btpence]$ 
   

Brian


   
ReplyQuote
(@CanMike)
Eminent Member
Joined: 20 years ago
Posts: 13
Topic starter  

Thanks again.

I had to create the .vimrc file, but once done I added the arguments and life is beautiful.

Why can't the entire world be Korn shell and vi?


   
ReplyQuote
(@bpence)
Member Admin
Joined: 1 year ago
Posts: 1375
 

vi scares normal people.

emacs scares vi people.

Brian


   
ReplyQuote
(@CanMike)
Eminent Member
Joined: 20 years ago
Posts: 13
Topic starter  

I will not discuss my age nor normality.

Let just say I work with:

a: tape drives
b: main frames
c: hierarchical databases (yep, top-down, tree architecture
d: COBOL
c: window versions 1 & 2

'nuff said


   
ReplyQuote
Share: