.vimrc

changeset 768
7ed19a36b198
parent 766
43018d0e439f
child 769
349f88702757
equal deleted inserted replaced
767:0e08061474a8 768:7ed19a36b198
1 " vim: et sts=2 sw=2 1 " vim: et sts=2 sw=2
2 " vim: fdm=marker 2 " vim: fdm=marker
3 3
4 set encoding=utf-8 4 set encoding=utf-8
5 scriptencoding utf-8 5 scriptencoding utf-8
6
7 unlet! skip_defaults_vim
8 source $VIMRUNTIME/defaults.vim
6 9
7 " on windows and not cygwin 10 " on windows and not cygwin
8 let g:on_windows = (has('win32') || has('win64')) 11 let g:on_windows = (has('win32') || has('win64'))
9 let g:myvim = $HOME . (g:on_windows ? '/vimfiles' : '/.vim') 12 let g:myvim = $HOME . (g:on_windows ? '/vimfiles' : '/.vim')
10 let g:vimcache = $HOME . '/.cache/vim' 13 let g:vimcache = $HOME . '/.cache/vim'
143 "}}} 146 "}}}
144 147
145 "}}} 148 "}}}
146 149
147 " General settings {{{ 150 " General settings {{{
148 syntax on
149 filetype plugin indent on
150
151 set incsearch
152 set hlsearch 151 set hlsearch
153 set ignorecase 152 set ignorecase
154 set smartcase 153 set smartcase
155 154
156 if has('gui_running') || $LANG =~# 'UTF-8' 155 if has('gui_running') || $LANG =~# 'UTF-8'
161 let &fillchars = "fold: " 160 let &fillchars = "fold: "
162 endif 161 endif
163 162
164 set linebreak 163 set linebreak
165 let &showbreak = "» " 164 let &showbreak = "» "
166 if exists('&breakindent') 165 set breakindent
167 set breakindent 166 set breakindentopt+=sbr
168 set breakindentopt+=sbr
169 endif
170 167
171 set virtualedit=block 168 set virtualedit=block
172 169
173 set autoindent 170 set autoindent
174 set expandtab 171 set expandtab
175 set shiftwidth=2 172 set shiftwidth=2
176 set shiftround 173 set shiftround
177 174
178 set formatoptions=cqln1j 175 set formatoptions=cqln1j
179 set backspace=indent,eol,start
180 176
181 set splitright splitbelow 177 set splitright splitbelow
182 set scrolloff=15 178 set scrolloff=15
183 set sidescrolloff=10 179 set sidescrolloff=10
184 set laststatus=2 180 set laststatus=2
185 set noshowmode 181 set noshowmode
186 set showcmd
187 set wildmenu
188 set wildignorecase 182 set wildignorecase
189 set shortmess+=c 183 set shortmess+=c
190 184
191 set noerrorbells 185 set noerrorbells
192 if has('patch-7.4-793') 186 set belloff=all
193 set belloff=all
194 endif
195 187
196 set autowriteall 188 set autowriteall
197 189
198 set ttimeout
199 set ttimeoutlen=25 190 set ttimeoutlen=25
200 191
201 set synmaxcol=200 192 set synmaxcol=200
202 193
203 set tags+=.tags 194 set tags+=.tags
468 459
469 " {{{ Commands 460 " {{{ Commands
470 " Preview markdown mail -- I edit with headers so I box them in a code block. 461 " Preview markdown mail -- I edit with headers so I box them in a code block.
471 command! MailPreview enew | set bt=nofile | 0r # | exe 'norm! 0O```<Esc>}O```' | silent exe '%!mutt-md2html | mutt-html2txt' | 0 462 command! MailPreview enew | set bt=nofile | 0r # | exe 'norm! 0O```<Esc>}O```' | silent exe '%!mutt-md2html | mutt-html2txt' | 0
472 command! MailPreviewHTML enew | set bt=nofile | setf html | 0r # | exe 'norm! 0O```<Esc>}O```' | silent exe '%!mutt-md2html' | 0 463 command! MailPreviewHTML enew | set bt=nofile | setf html | 0r # | exe 'norm! 0O```<Esc>}O```' | silent exe '%!mutt-md2html' | 0
473
474 " Diff unsaved buffer
475 command! DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
476 \ | wincmd p | diffthis
477 " }}} 464 " }}}
478 465
479 " Local stuff, finish up 466 " Local stuff, finish up
480 try 467 try
481 execute 'source ' . s:filename . '.local' 468 execute 'source ' . s:filename . '.local'

mercurial