1 "Author:arrow, for archlinux
3 if v:progname =~? "evim"
6 "set paste " this will reset some variables, so set before any
8 set backupdir=~/.tmp,/tmp,./
9 set backup " keep a backup file
10 set history=100 " keep 50 lines of command line history
11 set ruler " show the cursor position all the time
12 set showcmd " display incomplete commands
21 filetype plugin indent on
26 set cinoptions=>8,n-8,{8,^-8,:8,=8,g8,h8,p8,t8,+8,(8,u8,w1,m1 shiftwidth=8 tabstop=8
31 if &t_Co > 2 || has("gui_running")
35 nmap <F11> :nohlsearch<CR>
37 "nmap <F4> :set noscrollbind<CR>:set scrollopt=<CR>:set nowrap<CR>:set foldmethod=manual<CR>:set foldcolumn=0<CR>:only<CR>zR
38 "nmap <F5> :set tags-=/usr/include/tags<CR>
39 "nmap <F6> :set tags+=/usr/include/tags<CR>
40 "nmap <F7> :set tags+=/kernel/tags<CR>
41 "nmap <F8> :set tags-=/kernel/tags<CR>
42 set backspace=indent,eol,start
44 set formatoptions=croqlmM
47 set statusline=%((%1*%M%*%R%Y)%)%f%=%(\[%3l-%02c]%)[%03b/%02B]T9\ %P~%L
50 set fileencoding=utf-8
51 set fileencodings=utf-8,chinese,ucs-bom
56 filetype plugin indent on
58 \ if line("'\"") > 0 && line("'\"") <= line("$") |
62 au FileType c set formatprg=indent
63 au FileType cpp set formatprg=indent
64 if !exists("auto_arrow_c")
66 au BufNewFile *.c 0r ~/.vim/files/c.skel
67 "au BufNewFile *.c normal gnp
68 au BufNewFile ver.h 0r ~/.vim/files/ver.skel
69 au BufNewFile *.h 0r ~/.vim/files/h.skel
70 au BufNewFile *.sh 0r ~/.vim/files/sh.skel
71 au BufNewFile *.txt 0r ~/.vim/files/txt.skel
72 au BufNewFile Makefile 0r ~/.vim/files/makefile.skel
73 au BufNewFile Rules.make 0r ~/.vim/files/Rules.make.skel
74 ":%s/_filename_/\=bufname("%")
75 :"%s/_datetime_/\=strftime("%c")
76 map gse <ESC>:%s/_filename_/\=bufname("%")/<CR>:%s/_datetime_/\=strftime("%c")/<CR>
77 au BufNewFile *.[ch] normal gse
78 au BufNewFile *.sh normal gse
79 au BufRead ~/.tmp/mutt-* set tw=72
80 "au BufNewFile *.txt normal gse
82 au BufRead,BufNewFile *.viki set ft=viki
86 :source $VIMRUNTIME/delmenu.vim
87 :source $VIMRUNTIME/lang/menu_en_gb.utf-8.vim
88 :source $VIMRUNTIME/menu.vim
90 set guioptions=aegilLtb
92 set guifont=Courier\ 10
102 hi IncSearch term=reverse cterm=reverse gui=reverse
103 hi Search term=reverse ctermbg=darkmagenta ctermfg=white guibg=darkmagenta guifg=white
104 hi Cursor gui=reverse guifg=darkcyan guibg=white
106 let g:vikiUseParentSuffix=1
107 let g:vikiOpenUrlWith_mailto = 'mail %{URL}'
108 let g:vikiOpenFileWith_html = "silent !firefox %{FILE}"
109 let g:vikiOpenFileWith_ANY = "silent !ge top %{FILE}"
111 " if !exists("b:convertedPDF")
112 " exec "cd ". expand("%:p:h")
113 " exec "%!pdftotext ". expand("%:t") ." -"
116 " setlocal noswapfile buftype=nowrite
117 " let b:convertedPDF = 1
120 "let g:vikiOpenFileWith_pdf = 'call VikiOpenLink("%{FILE}", "", 1)|silent call ConvertPDF()'
121 "let g:deplatePrg = "deplate -x -X "
122 "au FileType viki compiler deplate
123 "let g:vikiNameSuffix=".viki"
124 "autocmd! BufRead,BufNewFile *.viki set filetype=viki
125 "autocmd! BufRead,BufNewFile $HOME/viki/* set filetype=viki
126 "VikiDefine KERNEL_WIKI kernel .vik
128 set mousehide " Hide the mouse when typing text
129 set mousemodel=extend
130 set path=.,include,/usr/include,,
132 set wildmode=list:full
133 let g:vimwiki_home = "~/wiki/"
134 set backupcopy=auto,breakhardlink
135 let g:SessionMgr_AutoManage = 0