2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-19 03:25:33 +00:00
steffen-dotfiles/nvim/autocommands.vim

26 lines
962 B
VimL
Raw Normal View History

augroup init
autocmd!
" Remember last location/cursor in file
autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
" Autoresize windows/splits when vim resizes
autocmd VimResized * wincmd =
" spell correction on markdown files and mail (for mutt)
autocmd FileType mail,markdown setlocal spell
autocmd FileType mail,markdown setlocal wrap
autocmd FileType mail,markdown setlocal spelllang=en,de
autocmd FileType mail,markdown setlocal textwidth=70
2021-02-11 14:26:48 +00:00
autocmd FileType mail,markdown setlocal formatoptions+=q
2021-02-11 14:26:48 +00:00
" correctly indent comments/quoted text in mails
autocmd FileType mail setlocal comments+=nb:>
2021-02-11 14:26:48 +00:00
autocmd FileType mail setlocal formatoptions+=aw
2020-03-07 16:12:12 +00:00
autocmd BufNewFile,BufRead neomutt-* set ft=mail
2020-07-08 17:27:44 +00:00
" special settings for json5, css and scss: better BEM
autocmd BufNewFile,BufRead *.{json5,css,scss} set iskeyword+=-
2021-05-12 09:41:21 +00:00
autocmd BufNewFile,BufRead *.scss set ft=scss.css
augroup END