aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vimrc80
1 files changed, 38 insertions, 42 deletions
diff --git a/vimrc b/vimrc
index 4e56ac4..8050640 100644
--- a/vimrc
+++ b/vimrc
@@ -3,41 +3,30 @@ call plug#begin()
3" Brilliant_Plugins_by_tpope: ========================. 3" Brilliant_Plugins_by_tpope: ========================.
4Plug 'tpope/vim-sensible' | " a sane and modern default configuration 4Plug 'tpope/vim-sensible' | " a sane and modern default configuration
5Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' 5Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with '
6" Plug 'tpope/vim-vinegar' | " Improves :Explore 6Plug 'tpope/vim-fugitive' | " the most complete GIT integration plugin
7Plug 'mhinz/vim-signify' | " show changes in the clutter bar
7" Plug 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values) 8" Plug 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values)
8" Plug 'tpope/vim-fugitive' | " the most complete GIT integration plugin
9" Plug 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround 9" Plug 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround
10 10
11
11" Colorschemes: ======================================. 12" Colorschemes: ======================================.
12Plug 'chriskempson/base16-vim' | " 13Plug 'chriskempson/base16-vim' | "
13map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>. 14map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>.
14 15
15" NETRW: =============================================. 16
16" let g:netrw_list_hide = '\(^\|\s\s\)\zs\.\S\+' | " directly from the netrw-vim-docu (why isn't it default?) 17" NERDTree: ==========================================.
17let g:netrw_list_hide = '^\..*' | " Explore mode: hide files starting with dot 18Plug 'scrooloose/nerdtree' | " replace NetRW, which is kind of buggy
18let g:netrw_hide = 1 | " show not-hidden files only 19map <leader><leader> :NERDTreeToggle<CR>
19let g:netrw_liststyle = 3 | " 3=tree 20set winwidth=30 " keep NERDTreeWindow at least this size
20let g:netrw_banner = 0 | " display help messages? 21set winminwidth=30 " (and all other windows, so TODO: watch out)
21let g:netrw_winsize = 20 | " window size in percent 22
22let g:netrw_fastbrowse = 2 | " manually refresh direcory list (avoids display errors)
23let g:netrw_keepdir = 0
24let g:netrw_browse_split = 4 | " 4=open in previous window
25let g:netrw_preview = 0 | "
26let g:netrw_alto = 0 | " open files on the right
27let g:netrw_altv = 1 | " open files on the right
28
29" let g:netrw_retmap = 1
30" let g:netrw_silent = 1
31" let g:netrw_special_syntax= 1
32" let g:netrw_preview = 0
33" let g:netrw_chgwin = 2
34 23
35" AIRLINE: ===========================================. 24" AIRLINE: ===========================================.
36Plug 'vim-airline/vim-airline' | " beautification of the mode line 25Plug 'vim-airline/vim-airline' | " beautification of the mode line
37let g:airline_detect_modified = 0 | 26let g:airline_detect_modified = 0 |
38let g:airline_detect_paste = 0 | 27let g:airline_detect_paste = 0 |
39let g:airline_exclude_preview = 1 | 28let g:airline_exclude_preview = 1 |
40let g:airline_extensions = ['tabline'] 29let g:airline_extensions = ['tabline', 'branch', 'syntastic']
41let g:airline#extensions#tabline#disable_refresh = 1 | 30let g:airline#extensions#tabline#disable_refresh = 1 |
42let g:airline#extensions#tabline#enabled = 1 | 31let g:airline#extensions#tabline#enabled = 1 |
43let g:airline#extensions#tabline#fnamemod = ':t:.' | " let airline just show the filename without its path 32let g:airline#extensions#tabline#fnamemod = ':t:.' | " let airline just show the filename without its path
@@ -51,18 +40,22 @@ let g:airline_inactive_collapse = 1 |
51let g:airline_powerline_fonts = 1 | 40let g:airline_powerline_fonts = 1 |
52let g:airline_section_c = '%F' 41let g:airline_section_c = '%F'
53 42
43
54" AIRLINE_Theme: =====================================. 44" AIRLINE_Theme: =====================================.
55Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme 45Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme
56let g:airline_theme='base16' | " specifies which colorscheme should airline uses 46let g:airline_theme='base16' | " specifies which colorscheme should airline uses
57" let g:airline_theme='papercolor' | " specifies which colorscheme should airline uses 47" let g:airline_theme='papercolor' | " specifies which colorscheme should airline uses
58 48
49
59" Additional: ========================================. 50" Additional: ========================================.
60Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages 51Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages
61Plug 'taglist-plus' " quick code navigator 52Plug 'taglist-plus' " quick code navigator
53let g:Tlist_Use_Right_Window = 1
62nnoremap <leader>l :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L 54nnoremap <leader>l :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L
63 55
56
64" Autocompleter: =====================================. 57" Autocompleter: =====================================.
65Plug 'Valloric/MatchTagAlways' 58Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/...
66Plug 'Valloric/YouCompleteMe' 59Plug 'Valloric/YouCompleteMe'
67let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar 60let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar
68let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar 61let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar
@@ -71,6 +64,7 @@ let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure
71let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword 64let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword
72let g:ycm_complete_in_comments = 1 " Completion in comments 65let g:ycm_complete_in_comments = 1 " Completion in comments
73let g:ycm_complete_in_strings = 1 " Completion in string 66let g:ycm_complete_in_strings = 1 " Completion in string
67
74Plug 'scrooloose/syntastic' 68Plug 'scrooloose/syntastic'
75set statusline+=%#warningmsg# 69set statusline+=%#warningmsg#
76set statusline+=%{SyntasticStatuslineFlag()} 70set statusline+=%{SyntasticStatuslineFlag()}
@@ -81,6 +75,7 @@ let g:syntastic_always_populate_loc_list = 1
81let g:syntastic_auto_loc_list = 1 75let g:syntastic_auto_loc_list = 1
82let g:syntastic_check_on_open = 1 76let g:syntastic_check_on_open = 1
83let g:syntastic_check_on_wq = 0 77let g:syntastic_check_on_wq = 0
78
84Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures 79Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures
85let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe 80let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe
86let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi 81let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi
@@ -91,6 +86,7 @@ let g:pymode_rope = 0 " https://github.com/david
91" let g:pymode_options_max_line_length = 120 86" let g:pymode_options_max_line_length = 120
92" let g:syntastic_python_flake8_args='--ignore=F821,E302,E501,E241,E301' 87" let g:syntastic_python_flake8_args='--ignore=F821,E302,E501,E241,E301'
93 88
89
94Plug 'SirVer/ultisnips' " replaces loremipsum (and many more) 90Plug 'SirVer/ultisnips' " replaces loremipsum (and many more)
95Plug 'honza/vim-snippets' " dependency of ultisnips 91Plug 'honza/vim-snippets' " dependency of ultisnips
96" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. 92" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
@@ -104,11 +100,6 @@ let g:UltiSnipsEditSplit="vertical"
104" Disabled ===========================================. 100" Disabled ===========================================.
105" Plug 'Shougo/neocomplete.vim' | " alternative to YouCompleteMe in some cases 101" Plug 'Shougo/neocomplete.vim' | " alternative to YouCompleteMe in some cases
106" Plug 'Shougo/vimproc.vim' | " dependency for other Shougo plugins 102" Plug 'Shougo/vimproc.vim' | " dependency for other Shougo plugins
107" Plug 'indenthtml.vim' | " works better with mixed html/css/javascript
108" Plug 'evanmiller/nginx-vim-syntax' | " TODO: check if now included in syntastic?
109
110" autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/
111
112 103
113call plug#end() | " all plugins are getting loaded on this line, don't remove! 104call plug#end() | " all plugins are getting loaded on this line, don't remove!
114 105
@@ -131,18 +122,13 @@ colorscheme base16-phd
131" Shortcut mods =======================================. 122" Shortcut mods =======================================.
132inoremap <C-Space> <C-x><C-o> 123inoremap <C-Space> <C-x><C-o>
133"inoremap <C-@> <C-Space> 124"inoremap <C-@> <C-Space>
134" keep selection when indenting a selected block: 125vnoremap < <gv| " allows deindenting a selected block and keeps selection
135vnoremap < <gv 126vnoremap > >gv| " allows indenting a selected block and keeps selection
136vnoremap > >gv 127nnoremap <Tab> :bn<CR>| " lets one use (CTRL+)Tab to switch between buffers
137nnoremap <C-Tab> :bn<CR>| " lets one use CTRL+Tab to switch between buffers 128nnoremap <S-Tab> :bp<CR>| " use (CTRL+)Shift+Tab to switch to previous buffers
138nnoremap <C-S-Tab> :bp<CR>| " use CTRL+Shift+Tab to switch to previous buffers
139
140
141inoremap <C-Backspace> <C-W>| " Bind CTRL+Backspace to vims version (CTRL+W) in insert mode 129inoremap <C-Backspace> <C-W>| " Bind CTRL+Backspace to vims version (CTRL+W) in insert mode
142 130
143 131
144
145
146" settings ============================================. 132" settings ============================================.
147" set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here 133" set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here
148set noshowmode | " because we are using some powerline derivat 134set noshowmode | " because we are using some powerline derivat
@@ -158,7 +144,7 @@ set notimeout ttimeout | " improves performance but is known to cause pro
158set linebreak | " wrap long lines at char 'breakat', not inside words 144set linebreak | " wrap long lines at char 'breakat', not inside words
159set nowrap | " but do not (by default) wrap long lines around 145set nowrap | " but do not (by default) wrap long lines around
160set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) 146set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well)
161set nonumber | " turn line numbers off (improves performance) 147set number | " turn line numbers on/off (performance decreases when they are shown)
162set nocursorline | " turn visual cursor line off (improves performance) 148set nocursorline | " turn visual cursor line off (improves performance)
163set nocursorcolumn | " turn visual cursor column off (improves performance) 149set nocursorcolumn | " turn visual cursor column off (improves performance)
164set ttyscroll=100 | " improves speed for terminal vim 150set ttyscroll=100 | " improves speed for terminal vim
@@ -172,9 +158,6 @@ set nostartofline | " when scrolling: do not move the cursor to colu
172set thesaurus+=/home/max/.vim/thesaurus/php.txt 158set thesaurus+=/home/max/.vim/thesaurus/php.txt
173set hlsearch | " highlights all search matches (not as performant!) 159set hlsearch | " highlights all search matches (not as performant!)
174set textwidth=100 | " line length (80 used to be default, but...) 160set textwidth=100 | " line length (80 used to be default, but...)
175
176
177
178set splitbelow | " open new windows below the current one (i find that more intuitive) 161set splitbelow | " open new windows below the current one (i find that more intuitive)
179set laststatus=2 162set laststatus=2
180set norelativenumber 163set norelativenumber
@@ -242,7 +225,7 @@ if has("autocmd")
242 augroup END 225 augroup END
243 226
244 augroup visual_mode_shows_unprintable " { 227 augroup visual_mode_shows_unprintable " {
245 set list | " shows unprinable characters in the current line 228 set nolist | " shows unprinable characters in the current line
246 " set cursorline | " use setcursorline in order to highlight non printable chars in the current line 229 " set cursorline | " use setcursorline in order to highlight non printable chars in the current line
247 autocmd ColorScheme * highlight NonText ctermbg=0 gui=bold guifg=#061229 230 autocmd ColorScheme * highlight NonText ctermbg=0 gui=bold guifg=#061229
248 autocmd ColorScheme * highlight CursorLineNr term=bold ctermfg=Yellow gui=bold guifg=Yellow 231 autocmd ColorScheme * highlight CursorLineNr term=bold ctermfg=Yellow gui=bold guifg=Yellow
@@ -302,3 +285,16 @@ endif
302" let g:miniBufExplShowBufNumbers = 0 285" let g:miniBufExplShowBufNumbers = 0
303" let g:miniBufExplSplitToEdge = 1 286" let g:miniBufExplSplitToEdge = 1
304" let g:miniBufExplVSplit = 20 " column width in chars 287" let g:miniBufExplVSplit = 20 " column width in chars
288" NETRW: =============================================.
289" Plug 'tpope/vim-vinegar' | " Improves :Explore
290" let g:netrw_list_hide = '^\..*' | " Explore mode: hide files starting with dot
291" let g:netrw_hide = 1 | " show not-hidden files only
292" let g:netrw_liststyle = 3 | " 3=tree
293" let g:netrw_banner = 0 | " display help messages?
294" let g:netrw_winsize = 20 | " window size in percent
295" let g:netrw_fastbrowse = 2 | " manually refresh direcory list (avoids display errors)
296" let g:netrw_keepdir = 0
297" let g:netrw_browse_split = 4 | " 4=open in previous window
298" let g:netrw_preview = 0 | "
299" let g:netrw_alto = 0 | " open files on the right
300" let g:netrw_altv = 1 | " open files on the right
..