summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/vim.nix
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-10-15 15:18:20 +0200
committerlassulus <lass@aidsballs.de>2015-10-15 15:18:20 +0200
commita8816bcfe351c1fe9e1a00b27707b56eb544d390 (patch)
treeb6aadaa1cde000d791699925dd67bde38046b411 /makefu/2configs/vim.nix
parent96f13eb838f9bee37a980170f281d3839deb2719 (diff)
parent2c65fed39714164ff4b28e3352440538ae262c79 (diff)
Merge remote-tracking branch 'pnp/master'
Diffstat (limited to 'makefu/2configs/vim.nix')
-rw-r--r--makefu/2configs/vim.nix13
1 files changed, 13 insertions, 0 deletions
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
+
+
'';