1
0
Fork 0
numbers/.config/nvim/plugin/autocmds.vim

24 lines
746 B
VimL
Raw Normal View History

2021-04-16 00:15:31 +00:00
scriptencoding utf-8
if !exists('autocommands_loaded') && has('autocmd')
let autocommands_loaded = 1
let ftToIgnore = ['markdown', 'html', 'text']
aug OnInsert
au InsertLeave * if &paste | setlocal nopaste | endif
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
aug END
2021-10-03 17:03:20 +00:00
aug Miscs
2021-10-14 20:47:41 +00:00
au TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=500}
2021-10-03 17:03:20 +00:00
au BufEnter * set fo-=c fo-=r fo-=o
2021-04-16 00:15:31 +00:00
aug END
aug OnSave
au BufWritePre * if index(ftToIgnore, &ft) < 0 | :%s/\s\+$//e
au BufWritePost *xresources !xrdb %
au BufWritePost *sxhkdrc !pkill -USR1 sxhkd
au QuitPre * if empty(&buftype) | lclose | endif
aug END
endif