From 4eaae3ff84995bce605f4c3553ad511a179d0c4b Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Sat, 5 Nov 2016 22:14:01 +0100 Subject: Added ikeymap: for autosnipets lists all possible completions, automatically inserts first snippet. This feature depends on the filetype (set ft). The filetype can have two values simultaneously, in which case the separator is a dot, like in html.django or html.css. --- vimrc | 86 +++++++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 53 insertions(+), 33 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index c98cac6..5ab571a 100644 --- a/vimrc +++ b/vimrc @@ -4,6 +4,7 @@ call plug#begin() Plug 'tpope/vim-sensible' | " a sane and modern default configuration Plug 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' Plug 'tpope/vim-fugitive' | " the most complete GIT integration plugin +Plug 'godlygeek/tabular' | " align code on a sign, like :Tab/= Plug 'mhinz/vim-signify' | " show changes in the clutter bar @@ -64,12 +65,12 @@ let g:airline_theme='base16' | " specifies which colors " Additional: ========================================. Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages Plug 'majutsushi/tagbar' " superseeds taglist-plus, which isn't maintained any more -let g:tagbar_autoclose = 1 -let g:tagbar_autofocus = 1 -let g:tagbar_autoshowtag = 1 -let g:tagbar_compact = 0 -let g:tagbar_indent = 0 -let g:tagbar_foldlevel = 99 +let g:tagbar_autoclose = 1 +let g:tagbar_autofocus = 1 +let g:tagbar_autoshowtag = 1 +let g:tagbar_compact = 0 +let g:tagbar_indent = 0 +let g:tagbar_foldlevel = 99 nnoremap l :TagbarToggle| " bind TagBar to Hotkey Ctrl+L @@ -84,7 +85,9 @@ let g:ycm_min_num_of_chars_for_completion = 1 let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar - +" disable -key for YCM so that it can be used with ultisnips +" let g:ycm_key_list_select_completion=[] +" let g:ycm_key_list_previous_completion=[] Plug 'scrooloose/syntastic' @@ -92,36 +95,40 @@ set statusline+=%#warningmsg# set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%* set signcolumn=yes " always show the column -let g:LatexBox_latexmk_preview_continuously = 1 -let g:LatexBox_viewer = "evince" -let g:syntastic_always_populate_loc_list = 1 -let g:syntastic_auto_loc_list = 0 -let g:syntastic_check_on_open = 1 -let g:syntastic_check_on_wq = 0 -let g:syntastic_quiet_messages = {"type":"style"} " filter (=do not display) style/formatting errors and warnings +let g:LatexBox_latexmk_preview_continuously = 1 +let g:LatexBox_viewer = "evince" +let g:syntastic_always_populate_loc_list = 1 +let g:syntastic_auto_loc_list = 0 +let g:syntastic_check_on_open = 1 +let g:syntastic_check_on_wq = 0 +let g:syntastic_quiet_messages = {"type":"style"} " filter ( = do not display) style/formatting errors and warnings " Syntastic -let g:syntastic_error_symbol = '✖' -let g:syntastic_style_error_symbol = '✗' -let g:syntastic_warning_symbol = '➔' -let g:syntastic_style_warning_symbol = '≈' +let g:syntastic_error_symbol = '✖' +let g:syntastic_style_error_symbol = '✗' +let g:syntastic_warning_symbol = '➔' +let g:syntastic_style_warning_symbol = '≈' Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures -let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe -let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi -let g:jedi#show_call_signatures_delay = 0 -let g:jedi#auto_vim_configure = 0 -let g:pymode_rope = 0 " https://github.com/davidhalter/jedi-vim/issues/163 +let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe +let g:jedi#show_call_signatures = 1 " which sadly does not support signatures like jedi +let g:jedi#show_call_signatures_delay = 0 +let g:jedi#auto_vim_configure = 0 +let g:pymode_rope = 0 " https://github.com/davidhalter/jedi-vim/issues/163 " autocmd FileType python jedi.preload_module('os', 'sys', 'math') " let g:pymode_options_max_line_length = 120 " let g:syntastic_python_flake8_args='--ignore=F821,E302,E501,E241,E301' Plug 'honza/vim-snippets' " dependency of ultisnips (see below) Plug 'SirVer/ultisnips' " replaces loremipsum (and many more) -let g:UltiSnipsExpandTrigger = ''| " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. -let g:UltiSnipsJumpForwardTrigger = ''| " \ -let g:UltiSnipsJumpBackwardTrigger = ''| " \ -" let g:UltiSnipsListSnippets = ''| " YouCompleteMe includes those, so this isn't necessary -" let g:UltiSnipsEditSplit = 'vertical' +"let g:UltiSnipsExpandTrigger = ''| " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. +"let g:UltiSnipsJumpForwardTrigger = ''| " \ +"let g:UltiSnipsJumpBackwardTrigger = ''| " \ +"let g:UltiSnipsListSnippets = ''| " YouCompleteMe includes those, so this isn't necessary +let g:UltiSnipsExpandTrigger = ''| " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. +let g:UltiSnipsJumpForwardTrigger = ''| " \ +let g:UltiSnipsJumpBackwardTrigger = ''| " \ +let g:UltiSnipsListSnippets = ''| " YouCompleteMe includes those, so this isn't necessary +" let g:UltiSnipsEditSplit = 'vertical' " Disabled ===========================================. @@ -151,10 +158,12 @@ inoremap \ \ +noremap :make + " settings ============================================. -" set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here +set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here " set selectmode=mouse,key,cmd | " enters vim's select mode when pressing shift-left or shift-END " set keymodel=startsel,stopsel | " makes shift-left, shift-right available for selecting text set breakindent | " Every wrapped line will continue visually indented @@ -174,7 +183,7 @@ set mouse=a | " also supported by vim, should be default set nocursorcolumn | " turn visual cursor column off (improves performance) set nocursorline | " turn visual cursor line off (improves performance) set nofoldenable | " disable code folding. I hate code folding -set norelativenumber | " we deactivate relative numbers, but have them mentioned here so we won't forget they existed +set relativenumber | " relative line numbers can speed up navigation set noshowmode | " because we are using some powerline derivat set nostartofline | " when scrolling: do not move the cursor to column 1 set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals @@ -185,7 +194,7 @@ set redrawtime=400 | " The time in milliseconds for redrawing the dis set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge set spell spelllang=en,de | " enable spell checker set splitbelow | " open new windows below the current one (i find that more intuitive) -set t_Co=256 | " required on some ssh sessions +" set t_Co=256 | " required on some ssh sessions set textwidth=100 | " line length (80 used to be default, but...) set thesaurus+=/home/max/.vim/thesaurus/php.txt set ts=2 sts=2 sw=2 expandtab | " indentation which i like (abbr: tabstop, softtabstop, shiftwidth) @@ -224,7 +233,7 @@ if bufname('%') == '' set bufhidden=wipe endif -" noautocmd +noautocmd if has("autocmd") set modeline | " set variables specific to a file, like indentation by adding a comment @@ -283,6 +292,13 @@ if has("autocmd") autocmd FileType vim setlocal keywordprg=:help |. augroup END + + augroup ChangeCursor + autocmd VimEnter * let &t_EI .= "\[0 q" + autocmd VimEnter * let &t_SI = "\]12;white\x7" + autocmd VimLeave * silent !echo -ne "\033]112\007" + augroup END + "set omnifunc=syntaxcomplete#Complete " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main " Enable omni completion. @@ -303,7 +319,11 @@ endif let base16colorspace=256 -colorscheme base16-phd +if filereadable(expand("~/.vimrc_background")) + source ~/.vimrc_background +else + colorscheme base16-phd +endif " colorscheme base16-embers " colorscheme base16-flat " colorscheme base16-summerfruit-dark -- cgit v1.2.3