summaryrefslogtreecommitdiff
path: root/dotrc/.vimrc
blob: 21efab02458e61d8fedb0d22fe6b365dcc0c648b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version 4.0
set compatible
set cpo-=<
set sw=4
set expandtab
set ai
set report=2
set more
set history=50
set visualbell
set noshowmatch
set modeline
set modelines=4

:if &term =~ "linux"
:  syntax on
:endif

let Gtags_Auto_Map = 1

:if $BGLIGHT == "Y"
: set background=light
:else
: set background=dark
:endif

:if $AMIGA == "Y"
: syntax off
: set background=light
:else
: syntax on
: let &colorcolumn=join(range(81, 999),",")
:endif

set wildchar=^I
set wildmode=list,longest
set wildignore=*.o,core,*~,*.bak,*.a,*.obj
set wildmenu

set fileformats=unix,dos,mac

" For quickfix
" set mp=make\ \\\|&\ egrep\ ^cc:\ \\\|&\ egrep\ error
set mp=make\ \\\|&\ egrep\ ^cc:

"
" This should work, but doesn't...
" set errorformat=cc:\ \"%f\"\,\ line\ %l:\ error\ %n:\ %m\.

" Map error commands
map _a :cn
map _s :cp
map __ :cc

" Map buffer cycling
map <C-Tab> :bnext
map! <C-Tab> :bnext

" Spelling options
set spellfile=$HOME/.spell.en.add

" Try and set color for xterm
"
" :if &term =~ "xterm"
" :    if has("terminfo")
" :        set t_Co=16
" :        set t_AB=[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm
" :        set t_AF=[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm
" :    else
" :        set t_Co=16
" :        set t_Sf=[3%dm
" :        set t_Sb=[4%dm
" :    endif
" :endif


" Autocommands for skeletons and the such
"
:if !exists("autocommands_loaded")
:  let autocommands_loaded = 1
: autocmd BufNewFile,BufRead * setlocal formatoptions-=cro
":  autocmd BufNewFile *.c 0r /devel/proformas/proforma.c
":  autocmd BufNewFile *.h 0r /devel/proformas/proforma.h
":  autocmd BufNewFile *.htm,*.html 0r $HOME/.skeleton/skeleton.html
":  autocmd BufNewFile,BufReadPost *.htm,*.html :vmenu HTML.Bold `>a</b>`<i<b>
":  autocmd BufNewFile,BufReadPost *.htm,*.html :vmenu HTML.Italic `>a</i>`<i<i>
":  autocmd BufNewFile,BufReadPost *.htm,*.html :vmenu HTML.Header.1 `>a</h1>`<i<h1>
":  autocmd BufNewFile,BufReadPost *.htm,*.html :vmenu HTML.Header.2 `>a</h2>`<i<h2>
":  autocmd BufNewFile,BufReadPost *.htm,*.html :vmenu HTML.Header.3 `>a</h3>`<i<h3>
":  autocmd BufNewFile,BufReadPost *.htm,*.html syntax on
":  autocmd BufNewFile,BufReadPost *.css syntax on
":  autocmd BufNewFile,BufReadPost *.h syntax on
":  autocmd BufNewFile,BufReadPost *.c syntax on
":  autocmd BufNewFile,BufReadPost *.cpp syntax on
":  autocmd BufNewFile,BufReadPost *.sql syntax on
":  autocmd BufNewFile,BufReadPost *.pc syntax on
":  autocmd BufNewFile,BufReadPost *.pc set syntax=cpp
":  autocmd BufNewFile,BufReadPost *.pkg syntax on
":  autocmd BufNewFile,BufReadPost *.pkg set syntax=plsql
:endif