Add hunner/vim-plist bundle

This commit is contained in:
Hunter Haugen 2013-06-25 11:10:58 -07:00
parent 4d18bb3c12
commit 0da64c4717
3 changed files with 5 additions and 29 deletions

3
.gitmodules vendored
View file

@ -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

1
.vim/bundle/vim-plist Submodule

@ -0,0 +1 @@
Subproject commit 0c834e58e81db2e2209d9df8e22c8a67772f2b3d

30
.vimrc
View file

@ -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