From 0da64c4717c9fb53859e6e216ad200f089575231 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 25 Jun 2013 11:10:58 -0700 Subject: [PATCH] Add hunner/vim-plist bundle --- .gitmodules | 3 +++ .vim/bundle/vim-plist | 1 + .vimrc | 30 +----------------------------- 3 files changed, 5 insertions(+), 29 deletions(-) create mode 160000 .vim/bundle/vim-plist diff --git a/.gitmodules b/.gitmodules index f0ee745..808b6cd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -37,3 +37,6 @@ [submodule ".vim/bundle/vim-puppet"] path = .vim/bundle/vim-puppet url = https://github.com/hunner/vim-puppet.git +[submodule ".vim/bundle/vim-plist"] + path = .vim/bundle/vim-plist + url = https://github.com/hunner/vim-plist.git diff --git a/.vim/bundle/vim-plist b/.vim/bundle/vim-plist new file mode 160000 index 0000000..0c834e5 --- /dev/null +++ b/.vim/bundle/vim-plist @@ -0,0 +1 @@ +Subproject commit 0c834e58e81db2e2209d9df8e22c8a67772f2b3d diff --git a/.vimrc b/.vimrc index 5288c52..d43539b 100644 --- a/.vimrc +++ b/.vimrc @@ -559,35 +559,6 @@ if has("autocmd") catch endtry augroup END - augroup plist - autocmd BufReadPre,FileReadPre *.plist set binary - fun MyBinaryPlistReadPost() - if getline("'[") =~ "^bplist" - '[,']!plutil -convert xml1 /dev/stdin -o /dev/stdout - let b:saveAsBinaryPlist = 1 - endif - set nobinary - filetype detect - endfun - autocmd BufReadPost *.plist call MyBinaryPlistReadPost() - autocmd FileReadPost *.plist call MyBinaryPlistReadPost() | let b:saveAsBinaryPlist = 0 - - fun MyBinaryPlistWritePre() - if exists("b:saveAsBinaryPlist") && b:saveAsBinaryPlist - set binary - silent '[,']!plutil -convert binary1 /dev/stdin -o /dev/stdout - if v:shell_error | undo | set nobinary | endif - endif - endfun - autocmd BufWritePre,FileWritePre *.plist call MyBinaryPlistWritePre() - fun MyBinaryPlistWritePost() - if exists("b:saveAsBinaryPlist") && b:saveAsBinaryPlist && !v:shell_error - undo - set nobinary - endif - endfun - autocmd BufWritePost,FileWritePost *.plist call MyBinaryPlistWritePost() - augroup END endif @@ -1176,6 +1147,7 @@ Bundle 'ctrlp.vim' Bundle 'gnupg' Bundle 'tpope/vim-markdown' Bundle 'hunner/vim-puppet' +Bundle 'hunner/vim-plist' filetype plugin indent on " Brief help