added hex synatx higlighting

This commit is contained in:
Stefan Etringer 2025-03-21 09:45:11 +01:00
parent bf71ea8fba
commit 659bd464b5
1 changed files with 11 additions and 0 deletions

11
vim/.vim/ftdetect/bin.vim Normal file
View File

@ -0,0 +1,11 @@
" vim -b : edit binary using xxd-format!
augroup Binary
au!
au BufReadPre *.bin let &bin=1
au BufReadPost *.bin if &bin | silent %!xxd
au BufReadPost *.bin set ft=xxd | endif
au BufWritePre *.bin if &bin | silent %!xxd -r
au BufWritePre *.bin endif
au BufWritePost *.bin if &bin | silent %!xxd
au BufWritePost *.bin set nomod | endif
augroup END