Add hunner/vim-plist bundle
This commit is contained in:
parent
4d18bb3c12
commit
0da64c4717
3 changed files with 5 additions and 29 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -37,3 +37,6 @@
|
||||||
[submodule ".vim/bundle/vim-puppet"]
|
[submodule ".vim/bundle/vim-puppet"]
|
||||||
path = .vim/bundle/vim-puppet
|
path = .vim/bundle/vim-puppet
|
||||||
url = https://github.com/hunner/vim-puppet.git
|
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
1
.vim/bundle/vim-plist
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 0c834e58e81db2e2209d9df8e22c8a67772f2b3d
|
||||||
30
.vimrc
30
.vimrc
|
|
@ -559,35 +559,6 @@ if has("autocmd")
|
||||||
catch
|
catch
|
||||||
endtry
|
endtry
|
||||||
augroup END
|
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
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1176,6 +1147,7 @@ Bundle 'ctrlp.vim'
|
||||||
Bundle 'gnupg'
|
Bundle 'gnupg'
|
||||||
Bundle 'tpope/vim-markdown'
|
Bundle 'tpope/vim-markdown'
|
||||||
Bundle 'hunner/vim-puppet'
|
Bundle 'hunner/vim-puppet'
|
||||||
|
Bundle 'hunner/vim-plist'
|
||||||
|
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
" Brief help
|
" Brief help
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue