-
Notifications
You must be signed in to change notification settings - Fork 1
/
vimrc.vim
77 lines (64 loc) · 1.95 KB
/
vimrc.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
" This activates pathogen.vim which helps manage plugin bundles in
" the bundles/ directory.
call pathogen#infect()
syntax on
filetype plugin indent on
let mapleader=" "
let maplocalleader=","
" This changes often, still searching for the perfect color scheme.
colorscheme darkspectrum
" I like the cursorline.
set cursorline
" I forget what this is for.
set nocompatible
" Line numbers.
set number
" Tabs and such.
set expandtab
set tabstop=8
set softtabstop=4
set shiftwidth=4
" These things often piss me off.
set smartindent
set autoindent
set comments=s1:/**,mb:\ *,ex:\ */,://,b:#,:%,:XCOMM,n:>,fb:-
set formatoptions=tcroq
" This causes the current search to be highlighted throughout the file.
set hlsearch
" Omni completion
set ofu=syntaxcomplete#Complete
function! DoPrettyXML()
" save the filetype so we can restore it later
let l:origft = &ft
set ft=
" delete the xml header if it exists. This will
" permit us to surround the document with fake tags
" without creating invalid xml.
1s/<?xml .*?>//e
" insert fake tags around the entire document.
" This will permit us to pretty-format excerpts of
" XML that may contain multiple top-level elements.
0put ='<PrettyXML>'
$put ='</PrettyXML>'
silent %!xmllint --format -
" xmllint will insert an <?xml?> header. it's easy enough to delete
" if you don't want it.
" delete the fake tags
2d
$d
" restore the 'normal' indentation, which is one extra level
" too deep due to the extra tags we wrapped around the document.
silent %<
" back to home
1
" restore the filetype
exe "set ft=" . l:origft
endfunction
command! PrettyXML call DoPrettyXML()
let vimclojure#FuzzyIndent=1
let vimclojure#HighlightBuiltins=1
let vimclojure#HighlightContrib=1
let vimclojure#DynamicHighlighting=1
let vimclojure#ParenRainbow=1
let vimclojure#WantNailgun = 1
let vimclojure#NailgunClient = $HOME . "/.vim/lib/vimclojure-nailgun-client/ng"