From 8be9dd7508c3ba3bbace6b34e8f2ddc782134d53 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Mon, 19 Sep 2016 16:59:58 +0200 Subject: Went back to YouCompleteMe changed colorscheme to base16 --- vimrc | 235 ++++++++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 158 insertions(+), 77 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 42397ce..55f4d8c 100644 --- a/vimrc +++ b/vimrc @@ -1,5 +1,6 @@ -set nocompatible " be iMproved, required -filetype off " required +set nocompatible " be iMproved, required +filetype off " required +set shell=/bin/bash " Vundle does strange things without " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim @@ -10,144 +11,224 @@ Plugin 'VundleVim/Vundle.vim' " Brilliant Plugins by tpope =========================. Plugin 'tpope/vim-sensible' | " a sane and modern default configuration -Plugin 'tpope/vim-fugitive' | " the most complete GIT integration plugin Plugin 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' -Plugin 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround Plugin 'tpope/vim-vinegar' | " Improves :Explore -Plugin 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values) +" Plugin 'tpope/vim-fugitive' | " the most complete GIT integration plugin +" Plugin 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround +" Plugin 'susam/vimer' +" Plugin 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values) " Colorschemes =======================================. -Plugin 'tpope/vim-vividchalk' | " dark theme Plugin 'nelstrom/vim-mac-classic-theme' | " light theme +Plugin 'Valloric/vim-valloric-colorscheme' +" let base16colorspace=256 " Access colors present in 256 colorspace +Plugin 'chriskempson/vim-tomorrow-theme' +Plugin 'chriskempson/base16-vim' " AIRLINE ============================================. Plugin 'vim-airline/vim-airline' | " beautification of the mode line Plugin 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme +let g:airline_theme='base16' | " specifies which colorscheme should airline uses let g:airline_powerline_fonts = 1 | " -let g:airline_inactive_collapse = 1 | " +" let g:airline_inactive_collapse = 1 | " +let g:airline_extensions=['tabline'] let g:airline#extensions#tabline#enabled = 1 | " let g:airline#extensions#tabline#show_buffers = 1 | " -let g:airline#extensions#tabline#show_tabs = 1 | " -let g:airline#extensions#tabline#fnamemod = ':t' | " let airline just show the filename without its path -let g:airline_theme='papercolor' | " specifies which colorscheme should airline uses +" let g:airline#extensions#tabline#show_tabs = 1 | " +" let g:airline#extensions#tabline#fnamemod = ':t' | " let airline just show the filename without its path +" let g:airline#extensions#whitespace#enabled = 0 +" let g:airline_exclude_preview = 1 +" let g:airline_theme='bubblegum' | " specifies which colorscheme should airline uses +" let g:airline_theme='tomorrow' | " specifies which colorscheme should airline uses +" let g:airline_theme='papercolor' | " specifies which colorscheme should airline uses +" let g:airline_theme='luna' | " specifies which colorscheme should airline uses " Additional =========================================. -Plugin 'taglist-plus' | " quick code navigator - Plugin 'sheerun/vim-polyglot' | " better syntax highlighting/indentation for multiple languages -Plugin 'gregsexton/matchtag' | " highlights closing ML tags like braces +Plugin 'taglist-plus' | " quick code navigator Plugin 'loremipsum' | " Sample text generator -" Plugin 'davidhalter/jedi-vim' | " best autocompletion for python -Plugin 'klen/python-mode' -Plugin 'tweekmonster/django-plus.vim' | " django helper " Autocompleter ======================================. -Plugin 'Shougo/vimproc.vim' | " dependency for other Shougo plugins -Plugin 'Shougo/neocomplete.vim' -Plugin 'Shougo/neosnippet-snippets' -Plugin 'Rip-Rip/clang_complete' +Plugin 'Valloric/MatchTagAlways' +Plugin 'Valloric/YouCompleteMe' +Plugin 'davidhalter/jedi-vim' | " jedi gets used to display python function signatures +let g:jedi#show_call_signatures_delay = 0 +let g:jedi#completions_enabled = 0 +" let g:jedi#show_call_signatures = "2" + +" Disabled ===========================================. +" Plugin 'Shougo/neocomplete.vim' +" Plugin 'tweekmonster/django-plus.vim' | " django helper +" Plugin 'Shougo/vimproc.vim' | " dependency for other Shougo plugins +" Plugin 'Shougo/neosnippet-snippets' +" Plugin 'Rip-Rip/clang_complete' +" Plugin 'indenthtml.vim' | " works better with mixed html/css/javascript +" Plugin 'evanmiller/nginx-vim-syntax' + + +" All of your Plugins must be added before the following line +call vundle#end() | " required +filetype on filetype plugin on -set omnifunc=syntaxcomplete#Complete -inoremap -inoremap +filetype indent on +syntax on | " enable syntax highlighting +syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact) +" set term=xtermc | " required on solaris +let base16colorspace=256 +" colorscheme mac_classic | " finally set which colorscheme to use +" colorscheme valloric +" colorscheme vividchalk | " finally set which colorscheme to use +" colorscheme Tomorrow +" colorscheme pencil +" colorscheme Tomorrow-Night-Bright +" colorscheme Tomorrow-Night +" colorscheme Tomorrow-Night-Blue +" colorscheme base16-default-dark +colorscheme base16-phd +" colorscheme Tomorrow-Night + +" Shortcut mods =======================================. +inoremap +"inoremap " keep selection when indenting a selected block: vnoremap < >gv - - nnoremap :bn| " lets one use CTRL+Tab to switch between tabs nnoremap :bp| " use CTRL+Shift+Tab to switch to preview tab - nnoremap :TlistToggle| " bind TagList to Hotkey Ctrl+L -" Disabled ===========================================. -"# Plugin 'indenthtml.vim' | " works better with mixed html/css/javascript -"# Plugin 'evanmiller/nginx-vim-syntax' - -" All of your Plugins must be added before the following line -call vundle#end() | " required -filetype plugin indent on | " required -" colorscheme mac_classic | " finally set which colorscheme to use -" colorscheme vividchalk | " finally set which colorscheme to use -colorscheme mac_classic - -" set term=xtermc | " required on solaris +" settings ============================================. +set hidden | " allows switiching buffers even if the current buffer contains changes (displays +) +set confirm | " asks 'do you want to save?' set t_Co=256 | " required on some ssh sessions - - -syntax on | " enable syntax highlighting -set hidden | " allow switiching buffers even if the current buffer contains changes (displays +) set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softtabstop, shiftwidth) +set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge set encoding=utf-8 | " set up vim's cosole encoding (not file encoding, for which there is fileencoding=) set ignorecase smartcase | " search with ignorecase by default, but use case sensitive search when one captical char is contained set ttimeoutlen=10 | " set esc key timeout in ms- +set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals set linebreak | " wrap long lines at char 'breakat', not inside words +set nowrap | " but do not (by default) wrap long lines around set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) -set number | " toggle line numbers +set nonumber | " turn line numbers off (improves performance) +set nocursorline | " turn visual cursor line off (improves performance) +set nocursorcolumn | " turn visual cursor column off (improves performance) +set ttyscroll=100 | " improves speed for terminal vim +set ttyfast | " improves speed for terminal vim +set lazyredraw | " disables redraw during macro exectution (improves performance) +set re=1 set relativenumber | " displays current lines line no as zero point from where relative numbers are getting counted -set list | " shows unprinable characters in the current line set nofoldenable | " disable code folding. I hate code folding - set spell spelllang=en,de | " enable spell checker +set nostartofline | " when scrolling: do not move the cursor to column 1 +set thesaurus+=/home/max/.vim/thesaurus/php.txt + + + set splitbelow | " open new windows below the current one (i find that more intuitive) -set colorcolumn=80 | " show an indicator (different background in column 80) -highlight ColorColumn guibg=#F0F0E0 +set laststatus=2 +set nocursorcolumn +set nocursorline +set norelativenumber +set writedelay=0 -if (&t_Co > 2) | " running in a terminal with colorterm support? (here: always true, defined above) - set hlsearch | " highlight all search matches - set cursorline | " highlight currently selected line -endif +if has("multi_byte") + set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below) + scriptencoding utf-8 | " tell vim that we are using utf-8 here + set showbreak+=› | " symbol used in the beginning of a wrapped line + set listchars=eol:↲ | " symbols used when using :set list (which displays non-printable chars) + set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars) + set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars) + set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars) + set listchars+=tab:▸\ | " symbols used when using :set list (which displays non-printable chars) +end if has("gui_running") set guioptions+=eig set guioptions-=T | " toolbar set guioptions+=c | " use console dialogs instead of popups set guioptions+=a | " autoselect: copy&paste using middleclick + set guioptions-=m | " remove menu + " set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 12 + set guifont=Dejavu\ Sans\ Mono\ for\ Powerline\ 12 + set guioptions-=e | " do not display tabs endif +if bufname('%') == '' + set bufhidden=wipe +endif + +noautocmd if has("autocmd") set modeline | " set variables specific to a file, like indentation by adding a comment " automatically reload this file when it gets edited - autocmd BufWritePost $MYVIMRC source $MYVIMRC - " automatically remove trailing white spaces on save.. - autocmd BufWritePre * %s/\s\+$//e + augroup reload_vimrc " { + autocmd! + autocmd BufWritePost $MYVIMRC source $MYVIMRC + augroup END " } + + augroup remove_whitespaces " { + " automatically remove trailing white spaces on save.. + autocmd BufWritePre * %s/\s\+$//e + augroup END " } + + augroup set_window_title " { + " autocmd BufWinEnter quickfix setl statusline=%t + autocmd BufEnter * let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]" + + + " set window title for screen(3) + if &term == "screen" + set t_ts=k + set t_fs=\ + endif + if &term == "screen" || &term == "xterm" + set title + endif + augroup END + + augroup visual_mode_shows_unprintable " { + set list | " shows unprinable characters in the current line + autocmd ColorScheme * highlight NonText ctermbg=0 guifg=#061229 + " + " + " highlight NonText guifg=#1d1f21 | " make non printable chars invisible. The active line is an exception. + " highlight ColorColumn guibg=#005f87 + " highlight ColorColumn guibg=#F0F0E0 + augroup END " } + "set omnifunc=syntaxcomplete#Complete " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main " Enable omni completion. " autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS - autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags - autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS - autocmd FileType python setlocal omnifunc=pythoncomplete#Complete - autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags + " autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags + " auto complete closing tag name when entering + " autocmd FileType python setlocal omnifunc=jedi#completions + " following autocommands are there to call neovim functions... + " autocmd FileType python setlocal omnifunc=pythoncomplete#Complete + " autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS + " autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags + " " Enable heavy omni completion. + " if !exists('g:neocomplete#sources#omni#input_patterns') + " let g:neocomplete#sources#omni#input_patterns = {} + " endif endif -let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]" -" set window title for screen(3) -if &term == "screen" - set t_ts=k - set t_fs=\ -endif -if &term == "screen" || &term == "xterm" - set title -endif + +" if filereadable(expand("~/.vimrc_background")) +" let base16colorspace=256 +" source ~/.vimrc_background +" endif -if has("multi_byte") - set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below) - scriptencoding utf-8 | " tell vim that we are using utf-8 here - set showbreak+=› | " symbol used in the beginning of a wrapped line - set listchars=eol:↲ | " symbols used when using :set list (which displays non-printable chars) - set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars) - set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars) - set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars) - set listchars+=tab:▸\ | " symbols used when using :set list (which displays non-printable chars) -endif +" set colorcolumn=80 | " show an indicator (different background in column 80) " set title " set t_ts=^[k -- cgit v1.2.3