if has("win32")
let b:vim_conf_dir = $HOME.'\vimfiles'
endif
+set nocompatible
if isdirectory( b:vim_conf_dir . '/tmp/') == 0
call mkdir(b:vim_conf_dir.'/tmp/', 'p', 0700)
endif
-set nocompatible
"load plugins
if filereadable(b:vim_conf_dir . '/plugins.vundel.vim')
endif
"
" auskommentiert, macht in screen das nix gut aussieht..
-"set termguicolors
+"set termguicolors
set background=dark
try
let g:gruvbox_contrast_dark = 'hard'
set backspace=indent,eol,start
set relativenumber
set number
-"set lazyredraw
+set lazyredraw
set autoindent
+set smartindent
set expandtab
set tabstop=4
set softtabstop=4
set pastetoggle=<F3>
-set scrolloff=5
-"set sidescrolloff=10
set encoding=utf-8
set modeline
nnoremap <Leader>i a'" << << "' <Esc>6hi
nnoremap <Leader>a a'{}' <Esc>2hi
nnoremap <Leader>A a'"+ +"' <Esc>4hi
-
-nnoremap <Leader>A a'"+ +"' <Esc>4hi
+autocmd FileType cpp nnoremap <Leader>a a'"<< <<"' <Esc>5hi
" see :h restore-position
-nnoremap <Leader>= msHmp=iB'pzt`s
+nnoremap <Leader>= msgg=G`s
inoremap kj <Esc>
inoremap jk <Esc>
inoremap ts<tab> // TODOts: <Esc>=$A
+inoremap obs<tab> /// <para><CR> OBSOLETE kann nach der Abspaltung von 1.12 entfernt werden<CR><Esc>=$A
inoremap no<tab> <Esc>0i <nodoc /><Esc>0i///<Esc>=$
inoremap td<tab> <Esc>0i//TODOts: doku<CR><summary> </summary><Esc>0i/// <Esc>kVj=$
nnoremap <F6> :wa<CR>:make -j 8<CR><CR>
inoremap <F6> <esc>:wa<CR>:make -j 8<CR><CR>
+nnoremap <F5> :wa\|!./%<CR>
+inoremap <F5> <esc>:wa\|!./%<CR>
+
nnoremap <C-l> <C-W>l
" Copy paste to/from system clipboard
vnoremap <C-c> "*y
-inoremap <C-S-v> <esc>"*p
-vnoremap <C-S-v> "*p
-
+noremap <C-v> "*p
+noremap <C-V> "*p
+inoremap <C-v> <esc>"*p
+vnoremap <C-v> "*p
"nnoremap <Leader>= mzgg=G`z<CR>
nnoremap <F2> :call FormatDocument()<CR>
" repeat last command on all selected:
vnoremap . :normal.<CR>
-
-"vnoremap <leader>tt :Tabular /^[^=]*\zs\S*=/l1l2<cr>
-vnoremap <leader>tt :Tabular /^[^-+=]*\zs\S*=/l1l2<cr>
+vnoremap <leader>tt :Tabular /^[^-+=]*\zs\S*=/l1l1<cr>
vnoremap <leader>t, :Tabular /,\zs/l1l1<cr>
-vnoremap <leader>t<space> :Tabular /\s\+\zs/l1l1<cr>
+vnoremap <leader>t<space> :Tabular /\s\+\zs/l1l0<cr>
+vnoremap <leader>t: :Tabular /:\zs/l1l0<cr>
vnoremap <leader>t( :Tabular /(/l1l0<cr>
-vnoremap <leader>t: :Tabular /:/r0c1l0<cr>
"
" append word under cursor with 'or' to current search pattern
nnoremap <Leader>s yiw/<C-R>/\\|<C-R>"<cr>
nnoremap <Leader>r :source ~/.vim/vimrc<CR>
endif
-
filetype plugin indent on
-let g:deoplete#enable_at_startup = 1
-call deoplete#custom#option({
- \ 'auto_complete': v:true,
- \ 'smart_case': v:true,
- \ 'auto_complete_popup': 'auto'
- \ })
-
-
" ack seems to have vanished from artfull, thus use silversearchger-ag
" for ack.vim:
if executable('ag')
hi Visual guifg=White guibg=Blue gui=bold
set diffopt+=vertical
-set diffopt+=iwhite
+"set diffopt+=iwhite
set diffopt+=algorithm:patience
"jump to next diff and center line
noremap <leader>n ]cz.
noremap <leader>p [cz.
+if has ('win32')
+ set guifont=DejaVu_Sans_Mono:h11:cANSI:qDRAFT
+endif
if &diff
" ignore whitespace
set diffopt+=vertical
set diffopt+=iwhite
set diffopt+=algorithm:patience
+
syntax off
+ highlight DiffText term=reverse cterm=reverse ctermfg=214 ctermbg=234 gui=reverse guifg=lightgreen guibg=DarkGreen
" go fullscreen:
- autocmd GuiEnter * simalt ~x
+ if has ('win32')
+ autocmd GuiEnter * simalt ~x
+ set guifont=DejaVu_Sans_Mono:h8:cANSI:qDRAFT
+ endif
" make all diff windows the same size
autocmd VimResized * wincmd =
autocmd VimEnter * 2wincmd w
endif
+
" remove currently unused fugitive buffers:
autocmd BufReadPost fugitive://* set bufhidden=delete
-autocmd GuiEnter * simalt ~x
-
" reset terminal colors after vim leaves
"if !has("gui_running")
" au VimLeave * !echo -ne "\033[0m"
" wird.
set t_ut=
-
-if has("gui_running")
- if has('win32')
- set guifont=Consolas:h10:cANSI:qDRAFT
- else
- set guifont=Monospace\ 12
- endif
-endif
-
-
if has ('win32') || has('win32unix')
let g:vimwiki_list = [
\{
- \ 'path':'~/vimwiki',
+ \ 'path':'~/vimwiki',
\ 'path_html':'~/vimwiki/html/',
\ 'syntax': 'markdown',
\ 'ext': '.md'
silent! s/{\(.\{-}\)}/" + \1 + "/g
endfunction
-
"""" ALE start """"
inoremap <F4> <Esc>:ALEToggle<CR>
nnoremap <F4> <Esc>:ALEToggle<CR>
let g:ale_linters = {
\ 'cpp': ['gcc', 'cppcheck', 'clang'],
- \}
+ \ 'perl': ['perl', 'perlcritic'],
+ \}
let b:ale_warn_about_trailing_whitespace = 1
let g:ale_sign_column_always = 1
let g:ale_cpp_clang_options =
\ -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g+
\'
-let g:ale_cpp_gcc_options =
+let g:ale_cpp_gcc_options =
\ '-std=c++14 -Wall -pedantic -fPIC
\ -I/usr/include/x86_64-linux-gnu/qt5
\ -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport
set lbr
endif
-hi CursorLineNr term=underline cterm=underline ctermfg=White ctermbg=darkBlue guibg=darkyellow
-hi clear Cursorline
-"hi CursorLine gui=underline term=underline cterm=underline
+hi CursorLineNr ctermbg=black guibg=black
+hi CursorLine ctermbg=black guibg=black
augroup CursorLine
au!
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
let g:acp_behaviorCssOmniPropertyLength = 1
let g:acp_behaviorCssOmniValueLength = 0
-
highlight ExtraWhitespace ctermfg=red guifg=red ctermbg=white guibg=DarkGrey
" keine trailing whitespaces in hub log files anzeigen