aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
authorMax Christian Pohle2016-09-19 16:59:58 +0200
committerMax Christian Pohle2016-09-19 16:59:58 +0200
commit8be9dd7508c3ba3bbace6b34e8f2ddc782134d53 (patch)
tree06066ba2ecc3552575b25c5659637b5c55be1fcc /vimrc
parent5f9813c9bfc64bcb4af2f4d6aa9544690366df19 (diff)
downloadvim-8be9dd7508c3ba3bbace6b34e8f2ddc782134d53.tar.bz2
vim-8be9dd7508c3ba3bbace6b34e8f2ddc782134d53.zip
Went back to YouCompleteMe
changed colorscheme to base16
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc235
1 files changed, 158 insertions, 77 deletions
diff --git a/vimrc b/vimrc
index 42397ce..55f4d8c 100644
--- a/vimrc
+++ b/vimrc
@@ -1,5 +1,6 @@
1set nocompatible " be iMproved, required 1set nocompatible " be iMproved, required
2filetype off " required 2filetype off " required
3set shell=/bin/bash " Vundle does strange things without
3 4
4" set the runtime path to include Vundle and initialize 5" set the runtime path to include Vundle and initialize
5set rtp+=~/.vim/bundle/Vundle.vim 6set rtp+=~/.vim/bundle/Vundle.vim
@@ -10,144 +11,224 @@ Plugin 'VundleVim/Vundle.vim'
10 11
11" Brilliant Plugins by tpope =========================. 12" Brilliant Plugins by tpope =========================.
12Plugin 'tpope/vim-sensible' | " a sane and modern default configuration 13Plugin 'tpope/vim-sensible' | " a sane and modern default configuration
13Plugin 'tpope/vim-fugitive' | " the most complete GIT integration plugin
14Plugin 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' 14Plugin 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with '
15Plugin 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround
16Plugin 'tpope/vim-vinegar' | " Improves :Explore 15Plugin 'tpope/vim-vinegar' | " Improves :Explore
17Plugin 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values) 16" Plugin 'tpope/vim-fugitive' | " the most complete GIT integration plugin
17" Plugin 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround
18" Plugin 'susam/vimer'
19" Plugin 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values)
18 20
19" Colorschemes =======================================. 21" Colorschemes =======================================.
20Plugin 'tpope/vim-vividchalk' | " dark theme
21Plugin 'nelstrom/vim-mac-classic-theme' | " light theme 22Plugin 'nelstrom/vim-mac-classic-theme' | " light theme
23Plugin 'Valloric/vim-valloric-colorscheme'
24" let base16colorspace=256 " Access colors present in 256 colorspace
25Plugin 'chriskempson/vim-tomorrow-theme'
26Plugin 'chriskempson/base16-vim'
22 27
23" AIRLINE ============================================. 28" AIRLINE ============================================.
24Plugin 'vim-airline/vim-airline' | " beautification of the mode line 29Plugin 'vim-airline/vim-airline' | " beautification of the mode line
25Plugin 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme 30Plugin 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme
31let g:airline_theme='base16' | " specifies which colorscheme should airline uses
26let g:airline_powerline_fonts = 1 | " 32let g:airline_powerline_fonts = 1 | "
27let g:airline_inactive_collapse = 1 | " 33" let g:airline_inactive_collapse = 1 | "
34let g:airline_extensions=['tabline']
28let g:airline#extensions#tabline#enabled = 1 | " 35let g:airline#extensions#tabline#enabled = 1 | "
29let g:airline#extensions#tabline#show_buffers = 1 | " 36let g:airline#extensions#tabline#show_buffers = 1 | "
30let g:airline#extensions#tabline#show_tabs = 1 | " 37" let g:airline#extensions#tabline#show_tabs = 1 | "
31let g:airline#extensions#tabline#fnamemod = ':t' | " let airline just show the filename without its path 38" let g:airline#extensions#tabline#fnamemod = ':t' | " let airline just show the filename without its path
32let g:airline_theme='papercolor' | " specifies which colorscheme should airline uses 39" let g:airline#extensions#whitespace#enabled = 0
40" let g:airline_exclude_preview = 1
41" let g:airline_theme='bubblegum' | " specifies which colorscheme should airline uses
42" let g:airline_theme='tomorrow' | " specifies which colorscheme should airline uses
43" let g:airline_theme='papercolor' | " specifies which colorscheme should airline uses
44" let g:airline_theme='luna' | " specifies which colorscheme should airline uses
33 45
34 46
35" Additional =========================================. 47" Additional =========================================.
36Plugin 'taglist-plus' | " quick code navigator
37
38Plugin 'sheerun/vim-polyglot' | " better syntax highlighting/indentation for multiple languages 48Plugin 'sheerun/vim-polyglot' | " better syntax highlighting/indentation for multiple languages
39Plugin 'gregsexton/matchtag' | " highlights closing ML tags like braces 49Plugin 'taglist-plus' | " quick code navigator
40Plugin 'loremipsum' | " Sample text generator 50Plugin 'loremipsum' | " Sample text generator
41" Plugin 'davidhalter/jedi-vim' | " best autocompletion for python
42Plugin 'klen/python-mode'
43Plugin 'tweekmonster/django-plus.vim' | " django helper
44 51
45 52
46" Autocompleter ======================================. 53" Autocompleter ======================================.
47Plugin 'Shougo/vimproc.vim' | " dependency for other Shougo plugins 54Plugin 'Valloric/MatchTagAlways'
48Plugin 'Shougo/neocomplete.vim' 55Plugin 'Valloric/YouCompleteMe'
49Plugin 'Shougo/neosnippet-snippets' 56Plugin 'davidhalter/jedi-vim' | " jedi gets used to display python function signatures
50Plugin 'Rip-Rip/clang_complete' 57let g:jedi#show_call_signatures_delay = 0
58let g:jedi#completions_enabled = 0
59" let g:jedi#show_call_signatures = "2"
60
61" Disabled ===========================================.
62" Plugin 'Shougo/neocomplete.vim'
63" Plugin 'tweekmonster/django-plus.vim' | " django helper
64" Plugin 'Shougo/vimproc.vim' | " dependency for other Shougo plugins
65" Plugin 'Shougo/neosnippet-snippets'
66" Plugin 'Rip-Rip/clang_complete'
67" Plugin 'indenthtml.vim' | " works better with mixed html/css/javascript
68" Plugin 'evanmiller/nginx-vim-syntax'
69
51 70
71
72" All of your Plugins must be added before the following line
73call vundle#end() | " required
74filetype on
52filetype plugin on 75filetype plugin on
53set omnifunc=syntaxcomplete#Complete 76filetype indent on
54inoremap <C-Space> <C-x><C-o> 77syntax on | " enable syntax highlighting
55inoremap <C-@> <C-Space> 78syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact)
79" set term=xtermc | " required on solaris
56 80
81let base16colorspace=256
82" colorscheme mac_classic | " finally set which colorscheme to use
83" colorscheme valloric
84" colorscheme vividchalk | " finally set which colorscheme to use
85" colorscheme Tomorrow
86" colorscheme pencil
87" colorscheme Tomorrow-Night-Bright
88" colorscheme Tomorrow-Night
89" colorscheme Tomorrow-Night-Blue
90" colorscheme base16-default-dark
91colorscheme base16-phd
92" colorscheme Tomorrow-Night
93
94" Shortcut mods =======================================.
95inoremap <C-Space> <C-x><C-o>
96"inoremap <C-@> <C-Space>
57" keep selection when indenting a selected block: 97" keep selection when indenting a selected block:
58vnoremap < <gv 98vnoremap < <gv
59vnoremap > >gv 99vnoremap > >gv
60
61
62nnoremap <C-Tab> :bn<CR>| " lets one use CTRL+Tab to switch between tabs 100nnoremap <C-Tab> :bn<CR>| " lets one use CTRL+Tab to switch between tabs
63nnoremap <C-S-Tab> :bp<CR>| " use CTRL+Shift+Tab to switch to preview tab 101nnoremap <C-S-Tab> :bp<CR>| " use CTRL+Shift+Tab to switch to preview tab
64
65nnoremap <C-l> :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L 102nnoremap <C-l> :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L
66 103
67" Disabled ===========================================. 104" settings ============================================.
68"# Plugin 'indenthtml.vim' | " works better with mixed html/css/javascript 105set hidden | " allows switiching buffers even if the current buffer contains changes (displays +)
69"# Plugin 'evanmiller/nginx-vim-syntax' 106set confirm | " asks 'do you want to save?'
70
71" All of your Plugins must be added before the following line
72call vundle#end() | " required
73filetype plugin indent on | " required
74" colorscheme mac_classic | " finally set which colorscheme to use
75" colorscheme vividchalk | " finally set which colorscheme to use
76colorscheme mac_classic
77
78" set term=xtermc | " required on solaris
79set t_Co=256 | " required on some ssh sessions 107set t_Co=256 | " required on some ssh sessions
80
81
82syntax on | " enable syntax highlighting
83set hidden | " allow switiching buffers even if the current buffer contains changes (displays +)
84set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softtabstop, shiftwidth) 108set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softtabstop, shiftwidth)
109set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge
85set encoding=utf-8 | " set up vim's cosole encoding (not file encoding, for which there is fileencoding=) 110set encoding=utf-8 | " set up vim's cosole encoding (not file encoding, for which there is fileencoding=)
86set ignorecase smartcase | " search with ignorecase by default, but use case sensitive search when one captical char is contained 111set ignorecase smartcase | " search with ignorecase by default, but use case sensitive search when one captical char is contained
87set ttimeoutlen=10 | " set esc key timeout in ms- 112set ttimeoutlen=10 | " set esc key timeout in ms-
113set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals
88set linebreak | " wrap long lines at char 'breakat', not inside words 114set linebreak | " wrap long lines at char 'breakat', not inside words
115set nowrap | " but do not (by default) wrap long lines around
89set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) 116set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well)
90set number | " toggle line numbers 117set nonumber | " turn line numbers off (improves performance)
118set nocursorline | " turn visual cursor line off (improves performance)
119set nocursorcolumn | " turn visual cursor column off (improves performance)
120set ttyscroll=100 | " improves speed for terminal vim
121set ttyfast | " improves speed for terminal vim
122set lazyredraw | " disables redraw during macro exectution (improves performance)
123set re=1
91set relativenumber | " displays current lines line no as zero point from where relative numbers are getting counted 124set relativenumber | " displays current lines line no as zero point from where relative numbers are getting counted
92set list | " shows unprinable characters in the current line
93set nofoldenable | " disable code folding. I hate code folding 125set nofoldenable | " disable code folding. I hate code folding
94
95set spell spelllang=en,de | " enable spell checker 126set spell spelllang=en,de | " enable spell checker
127set nostartofline | " when scrolling: do not move the cursor to column 1
128set thesaurus+=/home/max/.vim/thesaurus/php.txt
129
130
131
96set splitbelow | " open new windows below the current one (i find that more intuitive) 132set splitbelow | " open new windows below the current one (i find that more intuitive)
97set colorcolumn=80 | " show an indicator (different background in column 80) 133set laststatus=2
98highlight ColorColumn guibg=#F0F0E0 134set nocursorcolumn
135set nocursorline
136set norelativenumber
137set writedelay=0
99 138
100if (&t_Co > 2) | " running in a terminal with colorterm support? (here: always true, defined above) 139if has("multi_byte")
101 set hlsearch | " highlight all search matches 140 set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below)
102 set cursorline | " highlight currently selected line 141 scriptencoding utf-8 | " tell vim that we are using utf-8 here
103endif 142 set showbreak+=› | " symbol used in the beginning of a wrapped line
143 set listchars=eol:↲ | " symbols used when using :set list (which displays non-printable chars)
144 set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars)
145 set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars)
146 set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars)
147 set listchars+=tab:▸\ | " symbols used when using :set list (which displays non-printable chars)
148end
104 149
105if has("gui_running") 150if has("gui_running")
106 set guioptions+=eig 151 set guioptions+=eig
107 set guioptions-=T | " toolbar 152 set guioptions-=T | " toolbar
108 set guioptions+=c | " use console dialogs instead of popups 153 set guioptions+=c | " use console dialogs instead of popups
109 set guioptions+=a | " autoselect: copy&paste using middleclick 154 set guioptions+=a | " autoselect: copy&paste using middleclick
155 set guioptions-=m | " remove menu
156 " set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 12
157 set guifont=Dejavu\ Sans\ Mono\ for\ Powerline\ 12
158 set guioptions-=e | " do not display tabs
110endif 159endif
111 160
161if bufname('%') == ''
162 set bufhidden=wipe
163endif
164
165noautocmd
112 166
113if has("autocmd") 167if has("autocmd")
114 set modeline | " set variables specific to a file, like indentation by adding a comment 168 set modeline | " set variables specific to a file, like indentation by adding a comment
115 " automatically reload this file when it gets edited 169 " automatically reload this file when it gets edited
116 autocmd BufWritePost $MYVIMRC source $MYVIMRC 170 augroup reload_vimrc " {
117 " automatically remove trailing white spaces on save.. 171 autocmd!
118 autocmd BufWritePre * %s/\s\+$//e 172 autocmd BufWritePost $MYVIMRC source $MYVIMRC
173 augroup END " }
174
175 augroup remove_whitespaces " {
176 " automatically remove trailing white spaces on save..
177 autocmd BufWritePre * %s/\s\+$//e
178 augroup END " }
179
180 augroup set_window_title " {
181 " autocmd BufWinEnter quickfix setl statusline=%t
182 autocmd BufEnter * let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]"
183
184
185 " set window title for screen(3)
186 if &term == "screen"
187 set t_ts=k
188 set t_fs=\
189 endif
190 if &term == "screen" || &term == "xterm"
191 set title
192 endif
193 augroup END
194
195 augroup visual_mode_shows_unprintable " {
196 set list | " shows unprinable characters in the current line
197 autocmd ColorScheme * highlight NonText ctermbg=0 guifg=#061229
198 "
199 "
200 " highlight NonText guifg=#1d1f21 | " make non printable chars invisible. The active line is an exception.
201 " highlight ColorColumn guibg=#005f87
202 " highlight ColorColumn guibg=#F0F0E0
203 augroup END " }
204 "set omnifunc=syntaxcomplete#Complete
119 " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main 205 " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main
120 " Enable omni completion. 206 " Enable omni completion.
121 " autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS 207 " autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
122 autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags 208 " autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
123 autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS 209 " auto complete closing tag name when entering </-[space]
124 autocmd FileType python setlocal omnifunc=pythoncomplete#Complete 210 " autocmd Filetype html,markdown,xml iabbrev </ </<C-X><C-O>
125 autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags 211 " autocmd FileType python setlocal omnifunc=jedi#completions
212 " following autocommands are there to call neovim functions...
213 " autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
214 " autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
215 " autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
216 " " Enable heavy omni completion.
217 " if !exists('g:neocomplete#sources#omni#input_patterns')
218 " let g:neocomplete#sources#omni#input_patterns = {}
219 " endif
126endif 220endif
127 221
128let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]" 222
129" set window title for screen(3) 223" if filereadable(expand("~/.vimrc_background"))
130if &term == "screen" 224" let base16colorspace=256
131 set t_ts=k 225" source ~/.vimrc_background
132 set t_fs=\ 226" endif
133endif
134if &term == "screen" || &term == "xterm"
135 set title
136endif
137 227
138 228
139if has("multi_byte")
140 set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below)
141 scriptencoding utf-8 | " tell vim that we are using utf-8 here
142 set showbreak+=› | " symbol used in the beginning of a wrapped line
143 set listchars=eol:↲ | " symbols used when using :set list (which displays non-printable chars)
144 set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars)
145 set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars)
146 set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars)
147 set listchars+=tab:▸\ | " symbols used when using :set list (which displays non-printable chars)
148endif
149 229
150 230
231" set colorcolumn=80 | " show an indicator (different background in column 80)
151 232
152" set title 233" set title
153" set t_ts=^[k 234" set t_ts=^[k
..