diff options
author | Max Christian Pohle | 2016-09-19 16:59:58 +0200 |
---|---|---|
committer | Max Christian Pohle | 2016-09-19 16:59:58 +0200 |
commit | 8be9dd7508c3ba3bbace6b34e8f2ddc782134d53 (patch) | |
tree | 06066ba2ecc3552575b25c5659637b5c55be1fcc /vimrc | |
parent | 5f9813c9bfc64bcb4af2f4d6aa9544690366df19 (diff) | |
download | vim-karlmarks-8be9dd7508c3ba3bbace6b34e8f2ddc782134d53.tar.bz2 vim-karlmarks-8be9dd7508c3ba3bbace6b34e8f2ddc782134d53.zip |
Went back to YouCompleteMe
changed colorscheme to base16
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 235 |
1 files changed, 158 insertions, 77 deletions
@@ -1,5 +1,6 @@ | |||
1 | set nocompatible " be iMproved, required | 1 | set nocompatible " be iMproved, required |
2 | filetype off " required | 2 | filetype off " required |
3 | set 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 |
5 | set rtp+=~/.vim/bundle/Vundle.vim | 6 | set 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 =========================. |
12 | Plugin 'tpope/vim-sensible' | " a sane and modern default configuration | 13 | Plugin 'tpope/vim-sensible' | " a sane and modern default configuration |
13 | Plugin 'tpope/vim-fugitive' | " the most complete GIT integration plugin | ||
14 | Plugin 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' | 14 | Plugin 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' |
15 | Plugin 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround | ||
16 | Plugin 'tpope/vim-vinegar' | " Improves :Explore | 15 | Plugin 'tpope/vim-vinegar' | " Improves :Explore |
17 | Plugin '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 =======================================. |
20 | Plugin 'tpope/vim-vividchalk' | " dark theme | ||
21 | Plugin 'nelstrom/vim-mac-classic-theme' | " light theme | 22 | Plugin 'nelstrom/vim-mac-classic-theme' | " light theme |
23 | Plugin 'Valloric/vim-valloric-colorscheme' | ||
24 | " let base16colorspace=256 " Access colors present in 256 colorspace | ||
25 | Plugin 'chriskempson/vim-tomorrow-theme' | ||
26 | Plugin 'chriskempson/base16-vim' | ||
22 | 27 | ||
23 | " AIRLINE ============================================. | 28 | " AIRLINE ============================================. |
24 | Plugin 'vim-airline/vim-airline' | " beautification of the mode line | 29 | Plugin 'vim-airline/vim-airline' | " beautification of the mode line |
25 | Plugin 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme | 30 | Plugin 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme |
31 | let g:airline_theme='base16' | " specifies which colorscheme should airline uses | ||
26 | let g:airline_powerline_fonts = 1 | " | 32 | let g:airline_powerline_fonts = 1 | " |
27 | let g:airline_inactive_collapse = 1 | " | 33 | " let g:airline_inactive_collapse = 1 | " |
34 | let g:airline_extensions=['tabline'] | ||
28 | let g:airline#extensions#tabline#enabled = 1 | " | 35 | let g:airline#extensions#tabline#enabled = 1 | " |
29 | let g:airline#extensions#tabline#show_buffers = 1 | " | 36 | let g:airline#extensions#tabline#show_buffers = 1 | " |
30 | let g:airline#extensions#tabline#show_tabs = 1 | " | 37 | " let g:airline#extensions#tabline#show_tabs = 1 | " |
31 | let 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 |
32 | let 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 =========================================. |
36 | Plugin 'taglist-plus' | " quick code navigator | ||
37 | |||
38 | Plugin 'sheerun/vim-polyglot' | " better syntax highlighting/indentation for multiple languages | 48 | Plugin 'sheerun/vim-polyglot' | " better syntax highlighting/indentation for multiple languages |
39 | Plugin 'gregsexton/matchtag' | " highlights closing ML tags like braces | 49 | Plugin 'taglist-plus' | " quick code navigator |
40 | Plugin 'loremipsum' | " Sample text generator | 50 | Plugin 'loremipsum' | " Sample text generator |
41 | " Plugin 'davidhalter/jedi-vim' | " best autocompletion for python | ||
42 | Plugin 'klen/python-mode' | ||
43 | Plugin 'tweekmonster/django-plus.vim' | " django helper | ||
44 | 51 | ||
45 | 52 | ||
46 | " Autocompleter ======================================. | 53 | " Autocompleter ======================================. |
47 | Plugin 'Shougo/vimproc.vim' | " dependency for other Shougo plugins | 54 | Plugin 'Valloric/MatchTagAlways' |
48 | Plugin 'Shougo/neocomplete.vim' | 55 | Plugin 'Valloric/YouCompleteMe' |
49 | Plugin 'Shougo/neosnippet-snippets' | 56 | Plugin 'davidhalter/jedi-vim' | " jedi gets used to display python function signatures |
50 | Plugin 'Rip-Rip/clang_complete' | 57 | let g:jedi#show_call_signatures_delay = 0 |
58 | let 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 | ||
73 | call vundle#end() | " required | ||
74 | filetype on | ||
52 | filetype plugin on | 75 | filetype plugin on |
53 | set omnifunc=syntaxcomplete#Complete | 76 | filetype indent on |
54 | inoremap <C-Space> <C-x><C-o> | 77 | syntax on | " enable syntax highlighting |
55 | inoremap <C-@> <C-Space> | 78 | syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact) |
79 | " set term=xtermc | " required on solaris | ||
56 | 80 | ||
81 | let 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 | ||
91 | colorscheme base16-phd | ||
92 | " colorscheme Tomorrow-Night | ||
93 | |||
94 | " Shortcut mods =======================================. | ||
95 | inoremap <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: |
58 | vnoremap < <gv | 98 | vnoremap < <gv |
59 | vnoremap > >gv | 99 | vnoremap > >gv |
60 | |||
61 | |||
62 | nnoremap <C-Tab> :bn<CR>| " lets one use CTRL+Tab to switch between tabs | 100 | nnoremap <C-Tab> :bn<CR>| " lets one use CTRL+Tab to switch between tabs |
63 | nnoremap <C-S-Tab> :bp<CR>| " use CTRL+Shift+Tab to switch to preview tab | 101 | nnoremap <C-S-Tab> :bp<CR>| " use CTRL+Shift+Tab to switch to preview tab |
64 | |||
65 | nnoremap <C-l> :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L | 102 | nnoremap <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 | 105 | set hidden | " allows switiching buffers even if the current buffer contains changes (displays +) |
69 | "# Plugin 'evanmiller/nginx-vim-syntax' | 106 | set confirm | " asks 'do you want to save?' |
70 | |||
71 | " All of your Plugins must be added before the following line | ||
72 | call vundle#end() | " required | ||
73 | filetype plugin indent on | " required | ||
74 | " colorscheme mac_classic | " finally set which colorscheme to use | ||
75 | " colorscheme vividchalk | " finally set which colorscheme to use | ||
76 | colorscheme mac_classic | ||
77 | |||
78 | " set term=xtermc | " required on solaris | ||
79 | set t_Co=256 | " required on some ssh sessions | 107 | set t_Co=256 | " required on some ssh sessions |
80 | |||
81 | |||
82 | syntax on | " enable syntax highlighting | ||
83 | set hidden | " allow switiching buffers even if the current buffer contains changes (displays +) | ||
84 | set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softtabstop, shiftwidth) | 108 | set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softtabstop, shiftwidth) |
109 | set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge | ||
85 | set encoding=utf-8 | " set up vim's cosole encoding (not file encoding, for which there is fileencoding=) | 110 | set encoding=utf-8 | " set up vim's cosole encoding (not file encoding, for which there is fileencoding=) |
86 | set ignorecase smartcase | " search with ignorecase by default, but use case sensitive search when one captical char is contained | 111 | set ignorecase smartcase | " search with ignorecase by default, but use case sensitive search when one captical char is contained |
87 | set ttimeoutlen=10 | " set esc key timeout in ms- | 112 | set ttimeoutlen=10 | " set esc key timeout in ms- |
113 | set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals | ||
88 | set linebreak | " wrap long lines at char 'breakat', not inside words | 114 | set linebreak | " wrap long lines at char 'breakat', not inside words |
115 | set nowrap | " but do not (by default) wrap long lines around | ||
89 | set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) | 116 | set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) |
90 | set number | " toggle line numbers | 117 | set nonumber | " turn line numbers off (improves performance) |
118 | set nocursorline | " turn visual cursor line off (improves performance) | ||
119 | set nocursorcolumn | " turn visual cursor column off (improves performance) | ||
120 | set ttyscroll=100 | " improves speed for terminal vim | ||
121 | set ttyfast | " improves speed for terminal vim | ||
122 | set lazyredraw | " disables redraw during macro exectution (improves performance) | ||
123 | set re=1 | ||
91 | set relativenumber | " displays current lines line no as zero point from where relative numbers are getting counted | 124 | set relativenumber | " displays current lines line no as zero point from where relative numbers are getting counted |
92 | set list | " shows unprinable characters in the current line | ||
93 | set nofoldenable | " disable code folding. I hate code folding | 125 | set nofoldenable | " disable code folding. I hate code folding |
94 | |||
95 | set spell spelllang=en,de | " enable spell checker | 126 | set spell spelllang=en,de | " enable spell checker |
127 | set nostartofline | " when scrolling: do not move the cursor to column 1 | ||
128 | set thesaurus+=/home/max/.vim/thesaurus/php.txt | ||
129 | |||
130 | |||
131 | |||
96 | set splitbelow | " open new windows below the current one (i find that more intuitive) | 132 | set splitbelow | " open new windows below the current one (i find that more intuitive) |
97 | set colorcolumn=80 | " show an indicator (different background in column 80) | 133 | set laststatus=2 |
98 | highlight ColorColumn guibg=#F0F0E0 | 134 | set nocursorcolumn |
135 | set nocursorline | ||
136 | set norelativenumber | ||
137 | set writedelay=0 | ||
99 | 138 | ||
100 | if (&t_Co > 2) | " running in a terminal with colorterm support? (here: always true, defined above) | 139 | if 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 |
103 | endif | 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) | ||
148 | end | ||
104 | 149 | ||
105 | if has("gui_running") | 150 | if 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 | ||
110 | endif | 159 | endif |
111 | 160 | ||
161 | if bufname('%') == '' | ||
162 | set bufhidden=wipe | ||
163 | endif | ||
164 | |||
165 | noautocmd | ||
112 | 166 | ||
113 | if has("autocmd") | 167 | if 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 | ||
126 | endif | 220 | endif |
127 | 221 | ||
128 | let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]" | 222 | |
129 | " set window title for screen(3) | 223 | " if filereadable(expand("~/.vimrc_background")) |
130 | if &term == "screen" | 224 | " let base16colorspace=256 |
131 | set t_ts=k | 225 | " source ~/.vimrc_background |
132 | set t_fs=\ | 226 | " endif |
133 | endif | ||
134 | if &term == "screen" || &term == "xterm" | ||
135 | set title | ||
136 | endif | ||
137 | 227 | ||
138 | 228 | ||
139 | if 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) | ||
148 | endif | ||
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 |