Jochen Sprickerhof
Last changed: 2019-05-12

Software

Vim Config

set autowrite
set background=dark
set colorcolumn=80
set hidden
set ignorecase
set inccommand=nosplit
set linebreak
set nofoldenable
set nojoinspaces
set number
set pastetoggle=<F11>
set path+=**
set scrolloff=3
set shell=sh
set showmatch
set sidescrolloff=10
set smartcase
set spell
set termguicolors
set title
set updatetime=250
set wildmode=list:longest,full

highlight SpellBad guifg=red gui=underline
highlight ColorColumn guibg=#333333

let g:ale_linters = {'python': ['pyls'],}
let g:ale_completion_enabled = 1
set completeopt=menu,menuone,preview,noselect,noinsert
nnoremap <silent> gd :ALEGoToDefinitionInSplit<CR>

filetype plugin indent on

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

"https://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>