diff options
| -rw-r--r-- | vimrc | 80 |
1 files changed, 38 insertions, 42 deletions
| @@ -3,41 +3,30 @@ call plug#begin() | |||
| 3 | " Brilliant_Plugins_by_tpope: ========================. | 3 | " Brilliant_Plugins_by_tpope: ========================. |
| 4 | Plug 'tpope/vim-sensible' | " a sane and modern default configuration | 4 | Plug 'tpope/vim-sensible' | " a sane and modern default configuration |
| 5 | Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' | 5 | Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' |
| 6 | " Plug 'tpope/vim-vinegar' | " Improves :Explore | 6 | Plug 'tpope/vim-fugitive' | " the most complete GIT integration plugin |
| 7 | Plug '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: ======================================. |
| 12 | Plug 'chriskempson/base16-vim' | " | 13 | Plug 'chriskempson/base16-vim' | " |
| 13 | map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>. | 14 | map <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: ==========================================. |
| 17 | let g:netrw_list_hide = '^\..*' | " Explore mode: hide files starting with dot | 18 | Plug 'scrooloose/nerdtree' | " replace NetRW, which is kind of buggy |
| 18 | let g:netrw_hide = 1 | " show not-hidden files only | 19 | map <leader><leader> :NERDTreeToggle<CR> |
| 19 | let g:netrw_liststyle = 3 | " 3=tree | 20 | set winwidth=30 " keep NERDTreeWindow at least this size |
| 20 | let g:netrw_banner = 0 | " display help messages? | 21 | set winminwidth=30 " (and all other windows, so TODO: watch out) |
| 21 | let g:netrw_winsize = 20 | " window size in percent | 22 | |
| 22 | let g:netrw_fastbrowse = 2 | " manually refresh direcory list (avoids display errors) | ||
| 23 | let g:netrw_keepdir = 0 | ||
| 24 | let g:netrw_browse_split = 4 | " 4=open in previous window | ||
| 25 | let g:netrw_preview = 0 | " | ||
| 26 | let g:netrw_alto = 0 | " open files on the right | ||
| 27 | let 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: ===========================================. |
| 36 | Plug 'vim-airline/vim-airline' | " beautification of the mode line | 25 | Plug 'vim-airline/vim-airline' | " beautification of the mode line |
| 37 | let g:airline_detect_modified = 0 | | 26 | let g:airline_detect_modified = 0 | |
| 38 | let g:airline_detect_paste = 0 | | 27 | let g:airline_detect_paste = 0 | |
| 39 | let g:airline_exclude_preview = 1 | | 28 | let g:airline_exclude_preview = 1 | |
| 40 | let g:airline_extensions = ['tabline'] | 29 | let g:airline_extensions = ['tabline', 'branch', 'syntastic'] |
| 41 | let g:airline#extensions#tabline#disable_refresh = 1 | | 30 | let g:airline#extensions#tabline#disable_refresh = 1 | |
| 42 | let g:airline#extensions#tabline#enabled = 1 | | 31 | let g:airline#extensions#tabline#enabled = 1 | |
| 43 | let g:airline#extensions#tabline#fnamemod = ':t:.' | " let airline just show the filename without its path | 32 | let 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 | | |||
| 51 | let g:airline_powerline_fonts = 1 | | 40 | let g:airline_powerline_fonts = 1 | |
| 52 | let g:airline_section_c = '%F' | 41 | let g:airline_section_c = '%F' |
| 53 | 42 | ||
| 43 | |||
| 54 | " AIRLINE_Theme: =====================================. | 44 | " AIRLINE_Theme: =====================================. |
| 55 | Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme | 45 | Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme |
| 56 | let g:airline_theme='base16' | " specifies which colorscheme should airline uses | 46 | let 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: ========================================. |
| 60 | Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages | 51 | Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages |
| 61 | Plug 'taglist-plus' " quick code navigator | 52 | Plug 'taglist-plus' " quick code navigator |
| 53 | let g:Tlist_Use_Right_Window = 1 | ||
| 62 | nnoremap <leader>l :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L | 54 | nnoremap <leader>l :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L |
| 63 | 55 | ||
| 56 | |||
| 64 | " Autocompleter: =====================================. | 57 | " Autocompleter: =====================================. |
| 65 | Plug 'Valloric/MatchTagAlways' | 58 | Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/... |
| 66 | Plug 'Valloric/YouCompleteMe' | 59 | Plug 'Valloric/YouCompleteMe' |
| 67 | let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar | 60 | let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar |
| 68 | let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar | 61 | let 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 | |||
| 71 | let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword | 64 | let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword |
| 72 | let g:ycm_complete_in_comments = 1 " Completion in comments | 65 | let g:ycm_complete_in_comments = 1 " Completion in comments |
| 73 | let g:ycm_complete_in_strings = 1 " Completion in string | 66 | let g:ycm_complete_in_strings = 1 " Completion in string |
| 67 | |||
| 74 | Plug 'scrooloose/syntastic' | 68 | Plug 'scrooloose/syntastic' |
| 75 | set statusline+=%#warningmsg# | 69 | set statusline+=%#warningmsg# |
| 76 | set statusline+=%{SyntasticStatuslineFlag()} | 70 | set statusline+=%{SyntasticStatuslineFlag()} |
| @@ -81,6 +75,7 @@ let g:syntastic_always_populate_loc_list = 1 | |||
| 81 | let g:syntastic_auto_loc_list = 1 | 75 | let g:syntastic_auto_loc_list = 1 |
| 82 | let g:syntastic_check_on_open = 1 | 76 | let g:syntastic_check_on_open = 1 |
| 83 | let g:syntastic_check_on_wq = 0 | 77 | let g:syntastic_check_on_wq = 0 |
| 78 | |||
| 84 | Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures | 79 | Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures |
| 85 | let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe | 80 | let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe |
| 86 | let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi | 81 | let 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 | |||
| 94 | Plug 'SirVer/ultisnips' " replaces loremipsum (and many more) | 90 | Plug 'SirVer/ultisnips' " replaces loremipsum (and many more) |
| 95 | Plug 'honza/vim-snippets' " dependency of ultisnips | 91 | Plug '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 | ||
| 113 | call plug#end() | " all plugins are getting loaded on this line, don't remove! | 104 | call 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 =======================================. |
| 132 | inoremap <C-Space> <C-x><C-o> | 123 | inoremap <C-Space> <C-x><C-o> |
| 133 | "inoremap <C-@> <C-Space> | 124 | "inoremap <C-@> <C-Space> |
| 134 | " keep selection when indenting a selected block: | 125 | vnoremap < <gv| " allows deindenting a selected block and keeps selection |
| 135 | vnoremap < <gv | 126 | vnoremap > >gv| " allows indenting a selected block and keeps selection |
| 136 | vnoremap > >gv | 127 | nnoremap <Tab> :bn<CR>| " lets one use (CTRL+)Tab to switch between buffers |
| 137 | nnoremap <C-Tab> :bn<CR>| " lets one use CTRL+Tab to switch between buffers | 128 | nnoremap <S-Tab> :bp<CR>| " use (CTRL+)Shift+Tab to switch to previous buffers |
| 138 | nnoremap <C-S-Tab> :bp<CR>| " use CTRL+Shift+Tab to switch to previous buffers | ||
| 139 | |||
| 140 | |||
| 141 | inoremap <C-Backspace> <C-W>| " Bind CTRL+Backspace to vims version (CTRL+W) in insert mode | 129 | inoremap <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 |
| 148 | set noshowmode | " because we are using some powerline derivat | 134 | set noshowmode | " because we are using some powerline derivat |
| @@ -158,7 +144,7 @@ set notimeout ttimeout | " improves performance but is known to cause pro | |||
| 158 | set linebreak | " wrap long lines at char 'breakat', not inside words | 144 | set linebreak | " wrap long lines at char 'breakat', not inside words |
| 159 | set nowrap | " but do not (by default) wrap long lines around | 145 | set nowrap | " but do not (by default) wrap long lines around |
| 160 | set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) | 146 | set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) |
| 161 | set nonumber | " turn line numbers off (improves performance) | 147 | set number | " turn line numbers on/off (performance decreases when they are shown) |
| 162 | set nocursorline | " turn visual cursor line off (improves performance) | 148 | set nocursorline | " turn visual cursor line off (improves performance) |
| 163 | set nocursorcolumn | " turn visual cursor column off (improves performance) | 149 | set nocursorcolumn | " turn visual cursor column off (improves performance) |
| 164 | set ttyscroll=100 | " improves speed for terminal vim | 150 | set ttyscroll=100 | " improves speed for terminal vim |
| @@ -172,9 +158,6 @@ set nostartofline | " when scrolling: do not move the cursor to colu | |||
| 172 | set thesaurus+=/home/max/.vim/thesaurus/php.txt | 158 | set thesaurus+=/home/max/.vim/thesaurus/php.txt |
| 173 | set hlsearch | " highlights all search matches (not as performant!) | 159 | set hlsearch | " highlights all search matches (not as performant!) |
| 174 | set textwidth=100 | " line length (80 used to be default, but...) | 160 | set textwidth=100 | " line length (80 used to be default, but...) |
| 175 | |||
| 176 | |||
| 177 | |||
| 178 | set splitbelow | " open new windows below the current one (i find that more intuitive) | 161 | set splitbelow | " open new windows below the current one (i find that more intuitive) |
| 179 | set laststatus=2 | 162 | set laststatus=2 |
| 180 | set norelativenumber | 163 | set 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 | ||
