diff options
author | Audric Schiltknecht <storm@chemicalstorm.org> | 2013-08-30 17:48:59 +0200 |
---|---|---|
committer | Audric Schiltknecht <storm@chemicalstorm.org> | 2013-08-30 17:48:59 +0200 |
commit | fd0a8870447ffb5b190eb3b38dcd431c7af77b0f (patch) | |
tree | eb00b1d296d94259859936ff8f1972507d9bc5e3 | |
parent | d8808f080dc03ac0d896c52eac4fe47ad31d51b6 (diff) | |
download | dotfiles-fd0a8870447ffb5b190eb3b38dcd431c7af77b0f.tar.gz dotfiles-fd0a8870447ffb5b190eb3b38dcd431c7af77b0f.tar.bz2 dotfiles-fd0a8870447ffb5b190eb3b38dcd431c7af77b0f.zip |
Add specific vim configuration for pcap file
When opening a pcap file, opens it with xxd instead of simply displaying its
binary content.
-rw-r--r-- | vim/vim/specific/pcap.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vim/vim/specific/pcap.vim b/vim/vim/specific/pcap.vim new file mode 100644 index 0000000..3bc78a5 --- /dev/null +++ b/vim/vim/specific/pcap.vim @@ -0,0 +1,11 @@ +" vim -b : edit binary using xxd-format! +augroup Binary + au! + au BufReadPre *.pcap let &bin=1 + au BufReadPost *.pcap if &bin | %!xxd + au BufReadPost *.pcap set ft=xxd | endif + au BufWritePre *.pcap if &bin | %!xxd -r + au BufWritePre *.pcap endif + au BufWritePost *.pcap if &bin | %!xxd + au BufWritePost *.pcap set nomod | endif +augroup END |