From a176ee1f2fbc289a630fd643d97e764ff337461e Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 10 Oct 2015 20:23:43 +0200 Subject: m 2 vim: edit bin via xxd --- makefu/2configs/vim.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'makefu/2configs') diff --git a/makefu/2configs/vim.nix b/makefu/2configs/vim.nix index b71d95148..02a46d22a 100644 --- a/makefu/2configs/vim.nix +++ b/makefu/2configs/vim.nix @@ -103,6 +103,19 @@ in { endfunction call InitBackupDir() + augroup Binary + " edit binaries in xxd-output, xxd is part of vim + au! + au BufReadPre *.bin let &bin=1 + au BufReadPost *.bin if &bin | %!xxd + au BufReadPost *.bin set ft=xxd | endif + au BufWritePre *.bin if &bin | %!xxd -r + au BufWritePre *.bin endif + au BufWritePost *.bin if &bin | %!xxd + au BufWritePost *.bin set nomod | endif + augroup END + + ''; -- cgit v1.2.3