summaryrefslogtreecommitdiffstats
path: root/.config/nvim/after/plugin/autocmds.vim
blob: 0e7935bb57bb2989f0f5b6c332702f7e880b6475 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
" I don't know how to port this yet
autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif

autocmd BufNewFile,BufRead /tmp/neomutt* set noautoindent filetype=mail wm=0 tw=80

augroup bukugroup
  au! BufRead,BufNewFile,BufEnter buku-edit-* set filetype=buku
augroup END

" Restore last position
autocmd BufReadPost *
  \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
  \ |   exe "normal! g`\""
  \ | endif

augroup pkgbuild
    autocmd!
    autocmd BufRead,BufNewFile PKGBUILD set filetype=PKGBUILD
augroup END

augroup vimwiki
    autocmd!
    autocmd BufRead,BufNewFile *.wiki set filetype=vimwiki
augroup END