[svlug] Vim color syntax, wine, netscape mail
Nick Moffitt
nick at zork.net
Fri Nov 6 15:39:35 PST 1998
On Fri, Nov 06, 1998 at 08:33:18AM -0800, Scott wrote:
> Well i tried vim and I really like it. It has color syntaxing,
> tab->enter relationship i talked about earlier (dont know of a
> better way to describe it), smooth scrolling. The only thing is when
> i open vim w/ no parameters it wont color my key C functions and
> stuff. but if i write a little bit of the program like #include
> <stdio.h> in ae or something and save it then open it in vim it will
> color that and anything i type after that. Also is there a way to
> zoom to certain line in the document?
I can only answer this one by showing you bits of my .vimrc .
Note that this is specific to version 5.x of vim. Lines with
double-quotes in front are comments.
(:r.vimrc)
set nocompatible " Use Vim defaults (much better!)
set bs=2 " allow backspacing over everything in insert mode
set ai " always set autoindenting on
set backup " keep a backup file
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
" My old vi defaults (from AIX, no less)
set number ignorecase nowrapscan showmatch
"set equalprg=fmt
set background="dark" " for context-coloring
" Don't use Ex mode, use Q for formatting
noremap Q gq
noremap gQ Q
"set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
" My shortcut to compile and check my Perl scripts
map _ :w
:!perl -wc %
augroup cprog
" Remove all cprog autocommands
au!
" When starting to edit a file:
" For *.c and *.h files set formatting of comments and set C-indenting on.
" For other files switch it off.
" Don't change the order, it's important that the line with * comes first.
autocmd BufNewFile,BufRead * set formatoptions=qbl2c nocindent comments&
autocmd BufNewFile,BufRead [dD]raft,snd.*,.letter,.followup,.article,.article.[0-9]\+,pico.[0-9]\+,mutt*[0-9] set formatoptions=tqbl2c noai textwidth=70
autocmd BufNewFile,BufRead *.pl,*.pm,*.c,*.h,*.c? set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,:// cino=(0 ts=4
" Perl formatting options.
"autocmd BufNewFile,BufRead *.p? set formatoptions=croql cindent comments=# cino=(0 ts=4
augroup END
augroup gzip
" Remove all gzip autocommands
au!
" Enable editing of gzipped files
" read: set binary mode before reading the file
" uncompress text in buffer after reading
" write: compress file after writing
" append: uncompress file, append, compress file
autocmd BufNewFile,BufReadPre,FileReadPre *.gz set bin
autocmd BufNewFile,BufReadPost,FileReadPost *.gz '[,']!gunzip
autocmd BufNewFile,BufReadPost,FileReadPost *.gz set nobin
autocmd BufNewFile,BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . %:r
autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r
autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r
autocmd FileAppendPre *.gz !gunzip <afile>
autocmd FileAppendPre *.gz !mv <afile>:r <afile>
autocmd FileAppendPost *.gz !mv <afile> <afile>:r
autocmd FileAppendPost *.gz !gzip <afile>:r
augroup END
" COLOR!
source $VIM/syntax/syntax.vim
" The default methods for highlighting. Can be overridden later
"highlight Error term=reverse ctermbg=6 guibg=Red
"highlight Statement start=t_md stop=t_me cterm=bold ctermfg=2 gui=bold guifg=Brown
"highlight PreCondit term=underline ctermfg=7 guifg=Purple
"highlight Type term=underline cterm=bold ctermfg=2 guifg=SeaGreen gui=bold
"highlight String term=italic ctermfg=3 guifg=Magenta gui=underline
highlight Comment term=bold ctermfg=Red guifg=Red
"highlight Special term=bold ctermfg=1 guifg=SlateBlue gui=underline
"highlight Todo term=standout ctermbg=3 ctermfg=0 guifg=Blue guibg=Yellow
"highlight Identifier term=underline ctermfg=2 guifg=DarkCyan
"highlight link Function Statement " temporarily
"endif
--
* Progress (n.): The process through which Usenet has evolved from
smart people in front of dumb terminals to dumb people in front of
smart terminals. -- obs at burnout.demon.co.uk (obscurity)
--
echo "unsubscribe svlug" | mail majordomo at svlug.org
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe
More information about the svlug
mailing list