Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unix Syntax Color schemes



On Mar 23, 2005, at 3:53 PM, Derick Centeno wrote:

Hi Folks:
My question is in regards to Unix color syntax code. This is what I mean, in many versions of Linux and other versions of Unix, each user will find within a directory different colored items consistently indicating folders, files and so on. Also within a program such as vim it is possible to reset the use of the standard color scheme to something akin to one's personal taste and manner of working. One can for example write a dot file manipulating vim to produce line numbers and unique colors for functions in C or C++.


I'm sure everyone here, in this list is aware of what I'm referring to. Now to my question:
I notice that in OS X (v.10.3.8) this capability is not active. What is the sequence of commands I must use or invoke so that I can see such color syntax as I have described displayed with Terminal and within vim?


I'd appreciate any clues or ideas or even directions to other sites or mailing lists discussing this type of thing within Darwin.

For color ls and color vim you need to change your terminal type. The default vt100 does not show colors. I use tcsh still, so in my ~/.tcshrc I put the following:


setenv TERM xterm-color
alias ls "ls -G"

That will give you color output for the ls command. For vim I have the following in my ~/.vimrc file:

set listchars=tab:\|\
set wildchar=<Tab>
set background=light
set tabstop=4
set ruler
set showmode
syntax on
set autoindent
set nomesg
set showmatch
set mps+=<:>
set matchtime=1
au FileType fortran set textwidth=72
au FileType c set cindent
" ShowIndent Mode On/Off
map <F2> :call ShowIndent_on_off()<CR>
let indent_mode = 0
func! ShowIndent_on_off()
        if g:indent_mode == 0
                set list
                let g:indent_mode = 1
        else
                set nolist
                let g:indent_mode = 0
        endif
        return
endfunc
" ShowNumbers Mode On/Off
map <F3> :call ShowNumbers_on_off()<CR>
let number_mode = 0
func! ShowNumbers_on_off()
        if g:number_mode == 0
                set number
                let g:number_mode = 1
        else
                set nonumber
                let g:number_mode = 0
        endif
        return
endfunc
set pastetoggle=<F4>

Aaron

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Unix Syntax Color schemes (From: Derick Centeno <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.