-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
125 lines (103 loc) · 2.63 KB
/
vimrc
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
set nocompatible
filetype off
filetype plugin indent on
set modelines=0
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
syntax on
set encoding=utf-8
set scrolloff=3
set autoindent
set showmode
set showcmd
set hidden
set wildmenu
set wildmode=list:longest
set visualbell
set cursorline
set ttyfast
set ruler
set backspace=indent,eol,start
set laststatus=2
colorscheme ron
" Search
set ignorecase
set smartcase
" set gdefault
set incsearch
set showmatch
set hlsearch
" Wrapping
set wrap
set textwidth=79
set formatoptions=qrn1
set colorcolumn=85
" Show invisible characters
" set list
" set listchars=tab:▸\ ,eol:¬
" Disable help
inoremap <F1> <ESC>
nnoremap <F1> <ESC>
vnoremap <F1> <ESC>
" Shortcut to split window vertically
nnoremap <leader>w <C-w>v<C-w>l
" Save when losing focus "
" au FocusLost * :wa
set pastetoggle=<F2>
let vimclojure#HighlightBuiltins = 1
let vimclojure#ParenRainbow = 1
set number
" ant
let g:tlist_ant_settings = 'ant;p:Project;t:Target;r:Property'
nmap <F8> :TagbarToggle<CR>
nmap <F7> :NERDTreeToggle<CR>
if has("gui_running")
if has("gui_gtk2")
set guifont=Inconsolata\ 12
elseif has("gui_win32")
" set guifont=Consolas:h11:cANSI
set guifont=Inconsolata\-dz\ for\ Powerline:h9:cANSI
endif
endif
" ---------------------------------------------------------------------------
" Automagic Clojure folding on defn's and defmacro's
" Lifted from https://github.com/dakrone/dakrone-dotfiles/blob/master/.vimrc
function GetClojureFold()
if getline(v:lnum) =~ '^\s*(defn.*\s'
return ">1"
elseif getline(v:lnum) =~ '^\s*(defmacro.*\s'
return ">1"
elseif getline(v:lnum) =~ '^\s*(defmethod.*\s'
return ">1"
elseif getline(v:lnum) =~ '^\s*$'
let my_cljnum = v:lnum
let my_cljmax = line("$")
while (1)
let my_cljnum = my_cljnum + 1
if my_cljnum > my_cljmax
return "<1"
endif
let my_cljdata = getline(my_cljnum)
" If we match an empty line, stop folding
if my_cljdata =~ '^$'
return "<1"
else
return "="
endif
endwhile
else
return "="
endif
endfunction
function TurnOnClojureFolding()
setlocal foldexpr=GetClojureFold()
setlocal foldmethod=expr
setlocal foldcolumn=2
endfunction
" autocmd FileType clojure call TurnOnClojureFolding()
let g:Powerline_symbols = 'fancy'
set encoding=utf-8