vim-plist icon indicating copy to clipboard operation
vim-plist copied to clipboard

Non-plist filename extensions

Open magebeans opened this issue 5 years ago • 1 comments

Since this doesn't actually add a new filetype, setting ft to plist doesn't work on a plist file with a different extension (".strings"), for instance. How would I got about getting the plugin to treat such a file as a binary plist?

magebeans avatar Oct 26 '20 14:10 magebeans

That's a very valid use case and something this plugin should accommodate. I do not know the best way to implement support for this. I'm far from a VimL guru, so I am not aware of any solutions from the top of my head.

A temporary, but subpar solution, would be to add the following to your .vimrc:

autocmd BufReadCmd *.strings call plist#Read(1) | call plist#ReadPost()
autocmd BufWriteCmd,FileWriteCmd *.strings call plist#Write()

darfink avatar Oct 27 '20 10:10 darfink