From fd0a8870447ffb5b190eb3b38dcd431c7af77b0f Mon Sep 17 00:00:00 2001 From: Audric Schiltknecht Date: Fri, 30 Aug 2013 17:48:59 +0200 Subject: Add specific vim configuration for pcap file When opening a pcap file, opens it with xxd instead of simply displaying its binary content. --- vim/vim/specific/pcap.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 vim/vim/specific/pcap.vim (limited to 'vim') 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 -- cgit v1.2.3-70-g09d2