Hi,
I haven't used this extensively, but it seems to work fine (and works
in a fashion similar to the advice you've given in this thread):
http://www.vim.org/scripts/script.php?script_id=1590
Best regards,
Niklas
On Tue, Nov 25, 2008 at 2:16 AM, Ben Schmidt
<[EMAIL PROTECTED]> wrote:
>
> Part of the solution to this is in Nico's message here:
>
> http://groups.google.com/group/vim_mac/msg/6f3dcebafb712be4
>
> You could make it do it 'on the fly', too, with some autocommands...
> here's a rough sketch of one way to do it (I don't have much time right
> now!):
>
> command PLXml %!plutil -convert xml1 -o - /dev/stdin
> command PLBinary %!plutil -convert binary1 -o - /dev/stdin
> au BufReadPre *.plist setlocal binary
> au BufReadPost *.plist call s:PlistOpenOnTheFly()
> au BufWritePre *.plist call s:PlistWritePre()
> au BufWritePost *.plist call s:PlistOpenOnTheFly()
> func! s:PlistOpenOnTheFly()
> let b:plist_was_binary = 0
> if getline(1)[0] != '<'
> " Is that a valid way to check it's binary?!
> PLXml
> let b:plist_was_binary = 1
> endif
> endfunc
> func! s:PlistWritePre()
> if exists('b:plist_was_binary') && b:plist_was_binary == 1
> PLBinary
> endif
> endfunc
>
> Default is to write XML plists, but you can obviously change that logic.
>
> Haven't tested at all...and don't really know what I'm doing...used
> /dev/stdin rather than - to play it safe...it should be a good starting
> point anyway...
>
> Ben.
>
>
>
> Bee wrote:
>> I am sure there is a way... BBEdit does this.
>>
>> I can use terminal or OnMyCommand to convert a binary plist to text:
>>
>> plutil -convert xml1 __OBJ_PATH__
>>
>> Then open that with MacVim or any text editor.
>>
>> vim will open compressed files on the fly, so there must be a way to
>> open and convert plist files on the fly.
>>
>> Do you know how?
>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---