Binary-Plist icon indicating copy to clipboard operation
Binary-Plist copied to clipboard

Support bplist files that don't have a .plist extension

Open chrisdmc opened this issue 6 years ago • 5 comments

Looking at applications written for iOS (can't speak for MacOS), it's very common for plist files to not use the .plist extension. Is it possible to enable this extension based on the file magic 62 70 6C 69 73 74 30 30 D4 instead?

chrisdmc avatar Nov 26 '19 19:11 chrisdmc

That sequence of bytes is checked for files with a plist or strings file extension. Can you give an example of other files in iOS projects?

dnicolson avatar Nov 26 '19 19:11 dnicolson

Clippy on MacOS uses .data

j040p3d20 avatar Feb 14 '21 08:02 j040p3d20

Please try version 0.5.0 of the extension, setting the language mode to plist can be used for files without a .plist extension. For performance reasons the first bytes are only checked if Visual Studio Code thinks the file is a property list.

You can customize which file extensions should be recognized as plist files by using Visual Studio Code's files.associations.

dnicolson avatar Feb 18 '21 21:02 dnicolson

@dnicolson You should add this to the readme! I had opened a binary .plist file before installing this wonderful extension, and it just wouldn't decode it even after re-opening the file. Kept displaying bplist00�K_... and language mode XML in the bottom right. Changing the language mode to plist did the trick!

Edit: Just saw it is already there:

If Visual Studio Code does not recognize the file as a plist file select it as the language mode.

A subheading like would increase visibility for good, e.g.

Applying manually

cachius avatar Jun 14 '23 13:06 cachius

@cachius files with a .plist extension will automatically use the plist language mode. Are you able to demonstrate this not working?

Feel free to make a pull request to update the documentation.

dnicolson avatar Jun 14 '23 14:06 dnicolson