1 "Author:arrow, for archlinux
3 if v:progname =~? "evim"
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
20 filetype plugin indent on
25 set cinoptions=>8,n-8,{8,^-8,:8,=8,g8,h8,p8,t8,+8,(8,u8,w1,m1 shiftwidth=8 tabstop=8
30 if &t_Co > 2 || has("gui_running")
34 nmap <F11> :nohlsearch<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
43 set formatoptions=croqlmM
46 set statusline=%((%1*%M%*%R%Y)%)%f%=%(\[%3l-%02c]%)[%03b/%02B]T9\ %P~%L
49 set fileencoding=utf-8
50 set fileencodings=utf-8,chinese,ucs-bom
55 filetype plugin indent on
57 \ if line("'\"") > 0 && line("'\"") <= line("$") |
61 au FileType c set formatprg=indent
62 au FileType cpp set formatprg=indent
63 if !exists("auto_arrow_c")
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
80 au BufRead,BufNewFile *.viki set ft=viki
84 :source $VIMRUNTIME/delmenu.vim
85 :source $VIMRUNTIME/lang/menu_en_gb.utf-8.vim
86 :source $VIMRUNTIME/menu.vim
88 set guioptions=aegilLtb
90 set guifont=Courier\ 10
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}"
109 " if !exists("b:convertedPDF")
110 " exec "cd ". expand("%:p:h")
111 " exec "%!pdftotext ". expand("%:t") ." -"
114 " setlocal noswapfile buftype=nowrite
115 " let b:convertedPDF = 1
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,,
130 set wildmode=list:full
131 let g:vimwiki_home = "~/wiki/"