Jochen Sprickerhof

Last changed: 2017-11-02

Tools

Vim config

set autowrite
set background=dark
set colorcolumn=80
set hidden
set ignorecase
set inccommand=nosplit
set linebreak
set nojoinspaces
set number
set pastetoggle=<F11>
set scrolloff=3
set showmatch
set sidescrolloff=10
set smartcase
set spell
set title
set wildmode=longest:full,full

highlight clear SpellBad
highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline
highlight clear SpellCap
highlight SpellCap term=underline cterm=underline
highlight clear SpellRare
highlight SpellRare term=underline cterm=underline
highlight clear SpellLocal
highlight SpellLocal term=underline cterm=underline

highlight ColorColumn ctermbg=darkgrey

let c_space_errors = 1
let g:ale_python_flake8_args="--ignore=E501"
let g:ale_yaml_yamllint_options="-d '{extends: default, rules: {line-length: disable}}'"
let g:clang_library_path = '/usr/lib/llvm-3.8/lib'
let g:clang_user_options = '-std=c++11'
let g:deoplete#enable_at_startup = 1
let g:deoplete#sources#jedi#python_path = '/usr/bin/python3'
let g:neomake_cpp_clang_args = ["-std=c++14 -I/home/jspricke/.local/include/pcl-1.8"]
let g:neomake_cpp_enabled_makers=['clang']
let g:tagbar_autofocus = 1
let g:vimtex_view_method = 'zathura'

filetype plugin indent on

autocmd FileType gitcommit if ! &previewwindow && expand('%:t') !~# 'index' | DiffGitCached | wincmd L | wincmd h | endif
autocmd FileType qf,git,gitAnnotate,tagbar,diff,help setlocal spell!
autocmd FileType remind setlocal spelllang=de
autocmd BufNewFile,BufRead *.launch setf xml
autocmd BufRead /tmp/mutt* normal :g/^> -- $/,/^$/-1d^M/^$^M^L
autocmd BufNewFile,BufRead */.ssh/*.config  setf sshconfig

command DiffOrig vert new | set buftype=nofile | read ++edit # | 0d_ | diffthis | wincmd p | diffthis

"http://wiki.ubuntuusers.de/VIM/Tipps
":mkspell! ~/.local/share/nvim/site/spell/de.utf-8.add
":mkspell! ~/.local/share/nvim/site/spell/en.utf-8.add
function! ToggleSpell()
  if &spell
    if &spelllang == "de"
      set spelllang=en
      echo "toggle spell" &spelllang
    else
      set spell!
      echo "toggle spell off"
    endif
  else
    set spelllang=de
    set spell!
    echo "toggle spell" &spelllang
  endif
endfunction

nmap <F1> <nop>
map <F2> :call ToggleSpell()<cr>
imap <F2> <C-\><C-O>:call ToggleSpell()<cr>
nnoremap <silent> <F3> :UndotreeToggle<cr>
nnoremap <silent> <F4> :TagbarToggle<cr>

Alternatives