[UP] store, use 40G disk.
[arrow.git] / archlinux_conf / home / .vimrc
blob2ad3f35c170786d44485a0fc7d9b365616abe9b8
1 "Author:arrow, for archlinux
3 if v:progname =~? "evim"
4         finish
5 endif
6 set nocompatible
7 set backupdir=~/.tmp,/tmp,./
8 set backup              " keep a backup file
9 set history=100         " keep 50 lines of command line history
10 set ruler               " show the cursor position all the time
11 set showcmd             " display incomplete commands
12 map Q gq
13 map t gt 
14 map T gT 
15 set encoding=UTF-8
16 set report=0
17 set ignorecase
18 set nowrap
19 set incsearch
20 filetype plugin indent on
21 set autoindent
22 set tabstop=8
23 set softtabstop=8
24 set shiftwidth=8
25 set cinoptions=>8,n-8,{8,^-8,:8,=8,g8,h8,p8,t8,+8,(8,u8,w1,m1 shiftwidth=8 tabstop=8
26 set noexpandtab
27 set cindent
28 set notagbsearch
29 set tagrelative
30 if &t_Co > 2 || has("gui_running")
31         syntax on
32         set hlsearch
33 endif
34 nmap <F11> :nohlsearch<CR>
35 "nmap <F3> :only<CR>
36 "nmap <F4> :set noscrollbind<CR>:set scrollopt=<CR>:set nowrap<CR>:set foldmethod=manual<CR>:set foldcolumn=0<CR>:only<CR>zR
37 "nmap <F5> :set tags-=/usr/include/tags<CR>
38 "nmap <F6> :set tags+=/usr/include/tags<CR>
39 "nmap <F7> :set tags+=/kernel/tags<CR>
40 "nmap <F8> :set tags-=/kernel/tags<CR>
41 set backspace=indent,eol,start
42 set nosmartindent
43 set formatoptions=croqlmM
44 set textwidth=80
45 set laststatus=2
46 set statusline=%((%1*%M%*%R%Y)%)%f%=%(\[%3l-%02c]%)[%03b/%02B]T9\ %P~%L
47 set tags=tags
48 if has("multi_byte")
49         set fileencoding=utf-8
50         set fileencodings=utf-8,chinese,ucs-bom
51         set ambiwidth=double
52 endif
54 if has("autocmd")
55         filetype plugin indent on
56         autocmd BufReadPost *
57         \ if line("'\"") > 0 && line("'\"") <= line("$") |
58         \   exe "normal g`\"" |
59         \ endif
60         set formatprg=fmt
61         au FileType c set formatprg=indent
62         au FileType cpp set formatprg=indent
63         if !exists("auto_arrow_c")
64         let auto_arrow_c=1
65                 au BufNewFile *.c 0r ~/.vim/files/c.skel
66                 "au BufNewFile *.c normal gnp 
67                 au BufNewFile ver.h 0r ~/.vim/files/ver.skel
68                 au BufNewFile *.h 0r ~/.vim/files/h.skel
69                 au BufNewFile *.sh 0r ~/.vim/files/sh.skel
70                 au BufNewFile *.txt 0r ~/.vim/files/txt.skel
71                 au BufNewFile Makefile 0r ~/.vim/files/makefile.skel
72                 au BufNewFile Rules.make 0r ~/.vim/files/Rules.make.skel
73                 ":%s/_filename_/\=bufname("%")
74                 :"%s/_datetime_/\=strftime("%c")
75                 map gse <ESC>:%s/_filename_/\=bufname("%")/<CR>:%s/_datetime_/\=strftime("%c")/<CR> 
76                 au BufNewFile *.[ch] normal gse
77                 au BufNewFile *.sh normal gse
78                 "au BufNewFile *.txt normal gse
79         endif
80         au BufRead,BufNewFile *.viki set ft=viki
81 endif
82 if has("gui_running")
83         "set menu
84         :source $VIMRUNTIME/delmenu.vim
85         :source $VIMRUNTIME/lang/menu_en_gb.utf-8.vim
86         :source $VIMRUNTIME/menu.vim
87         set foldcolumn=0
88         set guioptions=aegilLtb
89         "colorscheme delek
90         set guifont=Courier\ 10
91 else
92         "colorscheme  default
93 endif
94 colorscheme  default
95 set mouse=a
96 :language time C
97 ":language ctype C
98 :language messages C
99 set showtabline=2
100 hi IncSearch term=reverse cterm=reverse gui=reverse
101 hi Search term=reverse ctermbg=darkmagenta ctermfg=white guibg=darkmagenta guifg=white
102 hi Cursor gui=reverse guifg=darkcyan guibg=white
104 let g:vikiUseParentSuffix=1
105 let g:vikiOpenUrlWith_mailto = 'mail %{URL}'
106 let g:vikiOpenFileWith_html  = "silent !firefox %{FILE}"
107 let g:vikiOpenFileWith_ANY   = "silent !ge top %{FILE}"
108 "fun! ConvertPDF()
109 "       if !exists("b:convertedPDF")
110 "               exec "cd ". expand("%:p:h")
111 "               exec "%!pdftotext ". expand("%:t") ." -"
112 "               :%!par 72w
113 "               cd -
114 "               setlocal noswapfile buftype=nowrite
115 "               let b:convertedPDF = 1
116 "       endif
117 "endf
118 "let g:vikiOpenFileWith_pdf = 'call VikiOpenLink("%{FILE}", "", 1)|silent call ConvertPDF()'
119 "let g:deplatePrg = "deplate -x -X "
120 "au FileType viki compiler deplate
121 "let g:vikiNameSuffix=".viki"
122 "autocmd! BufRead,BufNewFile *.viki set filetype=viki
123 "autocmd! BufRead,BufNewFile $HOME/viki/* set filetype=viki
124 "VikiDefine KERNEL_WIKI kernel .vik
126 set mousehide " Hide the mouse when typing text
127 set mousemodel=extend
128 set path=.,include,/usr/include,,
129 set wildmenu
130 set wildmode=list:full
131 let g:vimwiki_home = "~/wiki/"
132 set paste
133 set backupcopy=auto,breakhardlink