-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
183 lines (141 loc) · 3.45 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
call pathogen#infect()
set rtp+=~/dotfiles/powerline/powerline/bindings/vim
set nocompatible
let mapleader=','
set noerrorbells
set number
set numberwidth=4
set ruler
set scrolloff=5
set cursorline
set relativenumber
set encoding=utf-8
if &modifiable != 0
set fileencoding=utf-8
endif
set showmode
syntax on
filetype plugin indent on
source $HOME/.vim/filetype.vim
"set clipboard=unnamed
set backup
set backupdir=~/.vim/backup
set directory=~/.vim/tmp
set fileformats=unix,dos,mac
set autochdir
" hab ich noch drin, falls man es mal braucht
"set spell
"set spelllang=de
set hidden
set mouse=a
set wildmenu
set wildmode=list:longest
set incsearch
set hlsearch
set showmatch
set ignorecase
set smartcase
" setzt automatisch das g Flag bei Textersetzungen:
set gdefault
function! SetSolarizedBackground()
if strftime("%H") >= 5 && strftime("%H") < 17
if &background != 'light'
set background=light
endif
else
if &background != 'dark'
set background=dark
endif
endif
endfunction
" die richtige Farbwahl:
colorscheme default
set background=dark
" clearing uses the current background color
" (damit vim in tmux funktioniert)
set t_ut=
if &term == "xterm"
set t_Co=256
colorscheme wombat
set background=light
endif
if &term == "xterm-256color"
colorscheme solarized
call SetSolarizedBackground()
if has("autocmd")
autocmd bufwritepost * call SetSolarizedBackground()
endif
endif
if has("gui_macvim") || has("gui_running")
set guioptions=aeirL
colorscheme solarized
set autochdir
call SetSolarizedBackground()
if has("autocmd")
autocmd bufwritepost * call SetSolarizedBackground()
endif
endif
if has("gui_macvim")
set guifont=Inconsolata:h16
endif
if has("gui_gtk2")
set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 12
endif
" Powerline setup:
let g:Powerline_symbols='fancy'
if version >= 703
set colorcolumn=+1 "die Spalte 'textwidth+1' wird markiert
hi ColorColumn ctermbg=DarkRed guibg=DarkRed "überschreibt Werte vom colorscheme
endif
set backspace=indent,eol,start
set nostartofline
" von hukl:
set list listchars=tab:»·,trail:·
set shortmess=aOstT
set laststatus=2
set nofoldenable
set linebreak
set autoindent smartindent
set smarttab
"schaltet hlsearch aus
noremap <silent> <return> :nohlsearch<Bar>:echo<CR>
"latex:
let g:tex_flavor='latex'
"make:
nmap <F5> :make<CR>
"coole vsplit maps:
"verschiebt den Mittelbalken nach links bzw. rechts
nmap <leader>- <C-W><
nmap <leader>+ <C-W>>
"buffer movement:
nnoremap <space> :bnext<CR>
nnoremap <backspace> :bprevious<CR>
"Datum einfügen
imap <silent> <C-D><C-D> <C-R>=strftime("%Y-%m-%d %H:%M")<CR>
imap <silent> <C-D><C-F> <C-R>=strftime("[%H:%M] ")<CR>
" zum Tag/Funktionsdef. springen:
nmap <leader>f <C-]>
" nächstes falsch geschriebenes Wort:
nmap <leader>s ]s
" springt zum nächsten Komma und setzt danach eine neue Zeile:
nnoremap L f,a<CR><ESC>w
" vimwiki config:
let g:vimwiki_list = [{'path': '~/Dropbox/vimwiki/'}]
let g:vimwiki_listsyms = '✗○◐●✓'
""" Syntastic
let g:syntastic_python_checkers = ["flake8", "pyflakes"]
" NERDTree ein-/ausblenden:
nmap <F9> :NERDTreeToggle<CR>
function! FixEmail()
set ft=mail
set tw=80
" mittels vim-better-whitespace:
StripWhitespace
endfunction
nmap <F8> :call FixEmail()<CR>
function! FixXML()
set ft=xml
execute "%!tidy -q -i --show-errors 1 -xml -utf8"
StripWhitespace
endfunction
nmap <F7> :call FixXML()<CR>