1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-18 01:53:22 -07:00

add autocmds for oldschool forth "screen" files

This commit is contained in:
Connor Olding 2021-10-07 12:30:00 -07:00
parent 44af28ca58
commit 831fd91862

View File

@ -216,6 +216,14 @@ if has('autocmd')
au FileType * setlocal fo-=c fo-=r fo-=o
augroup END
augroup forth
au!
" insert a newline every 64 bytes when reading
au! BufReadCmd blkfs,*.scr call setline('1', split(join(readfile(expand('<afile>')), ''), '\%65c\zs'))
" remove newlines when writing
au! BufWriteCmd blkfs,*.scr call writefile([join(getline('^', '$'), '')], expand('<afile>'))
augroup end
augroup nobells " good lord vim you are archaic
au!
au GUIEnter * set vb t_vb=