another update
[cinan.git] / .vimrc
blobe033256ea08cc18a76b9dc51f25189b24835941c
1 if v:progname =~? "evim"
2   finish
3 endif
5 set nocompatible
7 set backspace=indent,eol,start
9 map Q gq
11 " so that you can undo CTRL-U after inserting a line break.
12 inoremap <C-U> <C-G>u<C-U>
14 "if has("gui_running")
15 "    colo darkspectrum
16 "else
17     colo ir_black
18 "endif
19 if &t_Co > 2 || has("gui_running")
20   syntax on
21   set hlsearch
22 endif
24 if has("autocmd")
26   filetype plugin indent on
27   filetype plugin on 
28   augroup vimrcEx
29   au!
31   autocmd FileType text setlocal textwidth=78
33   autocmd BufReadPost *
34     \ if line("'\"") > 1 && line("'\"") <= line("$") |
35     \   exe "normal! g`\"" |
36     \ endif
38   augroup END
40 else
42   set autoindent                " always set autoindenting on
44 endif " has("autocmd")
46 if !exists(":DiffOrig")
47   command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
48                   \ | wincmd p | diffthis
49 endif
51 set showmatch
52 set incsearch
53 set number
54 set history=100
55 set ruler
56 set showcmd
57 set hlsearch
58 set smartindent
59 set smarttab
60 set smartcase
61 set expandtab
62 set wildmenu
63 set ignorecase
64 set shiftwidth=4
65 set nowrap
66 set showmode
67 set cursorline
68 set background=dark
69 set nojoinspaces
70 set mouse=r
71 "F12 - I can copy to clipboard, ctrl+f12 - go back
72 map <F12> \e:set foldcolumn=0 mouse=r nonumber \r 
73 map \e[24;5~ \e:set foldcolumn=5 mouse=a number \r
74 "zz - quit vim without saving
75 "fix backspace
76 nmap \x7f hx
77 nmap a i
78 "F2 = save file
79 map <F2> :w\r
80 "autocmd BufRead *.rb set foldmethod=syntax
81 "autocmd BufRead *.rb set foldcolumn=5
82 "F5 = run program
83 autocmd BufRead *.rb map <F5> :!clear; ruby % \r
84 au BufNewFile,BufRead *.srt setf srt
85 syntax on
86 if has("autocmd")
87   filetype indent on
88 endif