.vimrc

Tue, 27 May 2014 00:38:03 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Tue, 27 May 2014 00:38:03 -0400
changeset 5
fa2f0f9008e8
parent 1
727a469263f2
child 7
7e6e6ff35c4d
permissions
-rw-r--r--

Something usable in normal colorschemes and babun

1
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 set nocompatible
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 " call pathogen#infect()
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 " call pathogen#helptags()
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 " Setting up Vundle - the vim plugin bundler
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 let has_vundle=1
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 if !filereadable(vundle_readme)
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10 let has_vundle=0
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11 echo "Installing Vundle.."
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 echo ""
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13 silent !mkdir -p ~/.vim/bundle
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 set rtp+=~/.vim/bundle/vundle/
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18 call vundle#rc()
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19 Plugin 'gmarik/vundle'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
20
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
21 Plugin 'altercation/vim-colors-solarized'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
22 Plugin 'bling/vim-airline'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
23
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
24 Plugin 'Shougo/vimproc.vim'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
25 Plugin 'Shougo/unite.vim'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
26 Plugin 'Shougo/vimshell.vim'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
27 Plugin 'sjl/gundo.vim'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
28 Plugin 'majutsushi/tagbar'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
29 Plugin 'godlygeek/tabular'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
30 Plugin 'tomtom/tcomment_vim'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
31
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
32 Plugin 'danchoi/ri.vim'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
33 Plugin 'tpope/vim-fugitive'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
34 Plugin 'ludovicchabant/vim-lawrencium'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
35
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
36 if has_vundle == 0
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
37 echo "Installing Plugins, please ignore key map error messages"
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
38 echo ""
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
39 :PluginInstall
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
40 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
41 " Setting up Vundle - the vim plugin bundler end
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
42
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
43
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
44 syntax on
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
45 filetype plugin indent on
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
46
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
47 set enc=utf-8
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
48
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
49 set hlsearch
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
50 set ic smartcase
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
51
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
52 set lcs=tab:→·,trail:·
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
53
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
54 set ve=block
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
55
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
56 set autoindent
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
57 set expandtab
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
58 set shiftwidth=2
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
59 set softtabstop=2
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
60 " vim: enc=utf-8 et sts=2 sw=2
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
61
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
62 set backspace=indent,eol,start
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
63
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
64 " set nu
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
65 set scrolloff=2
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
66 set ruler
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
67 set showcmd
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
68 set wildmenu
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
69
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
70 nmap <silent> <F1> :Unite buffer<CR>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
71 nmap <silent> <F2> :Unite file<CR>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
72 nmap <silent> <F3> :VimShell<CR>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
73 map <silent> <F4> :noh<CR>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
74 nmap <silent> <F5> :GundoToggle<CR>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
75 nmap <silent> <F8> :TagbarToggle<CR>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
76
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
77 " This is supposed to get a CtrlP workalike with fuzzy match
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
78 " but i need to fix ignores and always chdir to a good place
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
79 if has("win32") || has("win16")
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
80 nmap <silent> <S-F2> :Unite -start-insert file_rec:!<CR>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
81 else
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
82 nmap <silent> <S-F2> :Unite -start-insert file_rec/async:!<CR>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
83 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
84
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
85 " F-n keys call out to normal mode from insert mode
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
86 imap <F1> <C-O><F1>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
87 imap <F2> <C-O><F2>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
88 " imap <F3> <C-O><F3>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
89 imap <F4> <C-O><F4>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
90 " imap <F5> <C-O><F5>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
91 " imap <F6> <C-O><F6>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
92 " imap <F7> <C-O><F7>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
93 imap <F8> <C-O><F8>
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
94
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
95 " Don't assume to scan includes when autocompleting
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
96 set cpt-=i
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
97
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
98 " Never open with folds collapsed
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
99 set nofoldenable
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
100
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
101 set lbr
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
102 set sbr=»\
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
103
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
104 set statusline=%f%m%r%h%w\ %y\ %=%l,%c\ %p%%\ %L
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
105 set laststatus=2
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
106
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
107 if has("win32") || has("win16")
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
108 let $MYVIM=$HOME.'/vimfiles'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
109
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
110 if !filewritable( $MYVIM . '/var' )
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
111 silent execute '!mkdir "'.$HOME.'\vimfiles\var"'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
112 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
113 if !filewritable( $MYVIM. '/var/backup' )
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
114 silent execute '!mkdir "'.$HOME.'\vimfiles\var\backup"'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
115 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
116 if !filewritable( $MYVIM . '/var/tmp' )
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
117 silent execute '!mkdir "'.$HOME.'\vimfiles\var\tmp"'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
118 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
119 if !filewritable( $MYVIM . '/var/undo' )
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
120 silent execute '!mkdir "'.$HOME.'\vimfiles\var\undo"'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
121 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
122
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
123 set guifont=Consolas:h11
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
124 set guioptions-=t
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
125 else
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
126 let $MYVIM=$HOME.'/.vim'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
127
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
128 if !filewritable( $MYVIM . '/var/backup' )
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
129 silent execute '!mkdir -p "'.$MYVIM.'/var/backup"'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
130 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
131 if !filewritable( $MYVIM . '/var/tmp' )
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
132 silent execute '!mkdir "'.$MYVIM.'/var/tmp"'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
133 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
134 if !filewritable( $MYVIM . '/var/undo' )
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
135 silent execute '!mkdir "'.$MYVIM.'/var/undo"'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
136 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
137
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
138 set guifont=Droid\ Sans\ Mono\ Slashed\ 10
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
139 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
140
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
141 set backupdir=$MYVIM/var/backup//,.
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
142 set directory=$MYVIM/var/tmp//,.
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
143
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
144 set backup
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
145 set autowrite
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
146 " set hidden -- autowrite vs hidden, haven't decided.
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
147
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
148 if has('persistent_undo')
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
149 set undofile
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
150 set undodir=$MYVIM/var/undo//,.
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
151 end
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
152
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
153 if has('gui_running')
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
154 set number
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
155 set background=dark
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
156 set columns=120 lines=40
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
157 colorscheme solarized
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
158 end
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
159
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
160 autocmd FileType text setlocal textwidth=78
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
161
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
162
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
163 " -- Perl stuff
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
164 function! PerlSettings ()
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
165 setlocal keywordprg=perldoc\ -f
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
166 setlocal makeprg=perl\ -c\ %\ $*
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
167 setlocal errorformat=%m\ at\ %f\ line\ %l
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
168 endfunction
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
169
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
170 autocmd FileType perl call PerlSettings()
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
171
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
172 " preload templates into new buffers by file extension
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
173 " autocmd BuffNewFile * silent! 0r $MYVIM/templates/%:e.template
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
174
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
175 " strip trailing whitespace on save
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
176 " autocmd BufWritePre * :%s/\s+$//e
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
177
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
178 "let perl_fold = 1 "perl fold scanning is slow
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
179 let perl_include_pod = 1
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
180
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
181 " -- Gundo
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
182 " I prefer python3 on windows if I have to use it.
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
183 if has('win32')
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
184 let g:gundo_prefer_python3=1
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
185 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
186
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
187 " -- Tagbar
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
188 if has("win32") || has("win16")
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
189 let g:tagbar_ctags_bin = 'C:\Users\mhoward\bin\ctags.exe'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
190 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
191
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
192 let g:tagbar_autoclose = 1
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
193 let g:tagbar_autofocus = 1
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
194 let g:tagbar_compact = 1
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
195
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
196 let g:tagbar_type_perl = {
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
197 \ 'kinds' : [
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
198 \ 'p:packages:1:0',
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
199 \ 'e:extends',
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
200 \ 'r:roles',
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
201 \ 'c:constants:0:0',
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
202 \ 'f:formats:0:0',
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
203 \ 'a:attributes',
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
204 \ 's:subroutines',
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
205 \ 'l:labels',
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
206 \ ],
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
207 \ 'deffile' : '$MYVIM/ctags/perl.cnf'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
208 \ }
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
209
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
210
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
211 " -- Unite
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
212 call unite#filters#matcher_default#use(['matcher_fuzzy'])
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
213 call unite#filters#sorter_default#use(['sorter_rank'])
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
214 let g:unite_source_history_yank_enable = 1
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
215
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
216 if executable('ag')
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
217 let g:unite_source_grep_command = 'ag'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
218 let g:unite_source_grep_default_opts = '--nogroup --nocolor --column'
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
219 let g:unite_source_grep_recursive_opt = ''
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
220 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
221
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
222 " -- Airline
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
223 let g:airline#extensions#whitespace#enabled = 0
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
224
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
225
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
226 " Local stuff
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
227 try
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
228 if has("win32") || has("win16")
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
229 source ~/_vimrc.local
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
230 else
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
231 source ~/.vimrc.local
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
232 endif
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
233 catch
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
234 endtry
727a469263f2 Add dotfiles
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
235

mercurial