-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no second tab #119
Comments
You shouldn't need to do anything to make it work. What is your environment? Can you provide a reduced plist file and/or a video recording? |
Perhaps this is part of the problem; the files I'm working with regularly exceed 50MiB - and, because they're binary, editing them is a RPITA. I was hoping your extension would simplify this.
Fairly standard Win11 machine. (No fruit in sight. :-)
Not at the moment; I will see which one of these is easier to produce - but it will have to wait until tomorrow, at least. |
I don't know if this shows what you need to know, but I made a screen recording. I'm also not sure the resolution is good enough to understand what's happening, so here's the blow-by-blow: Before starting the recording, I resized the VS Code window to almost maximized, leaving a sliver of desktop visible on the right, and put a file called "my huge.plist" there on the visible portion. I usually have several tabs open in VS Code, so just for kicks, I opened the Settings page and the Keyboard Shortcuts list. I also updated VSc to 1.92.0 before recording and left the Release Notes tab open, and also checked for any updates to your extension. After starting the screen recorder, I dragged "my huge.plist" from the Desktop to the open space at the right of the tab bar. This caused the "Open Anyway" screen to appear, and I clicked that button and selected "Text Editor" from the top of the screen, as your instructions say to do. From there I get the expected tab full of gibberish, but no second tab. (You can see that the first few characters of this file are "bplist00", presumably indicating a binary plist file.) Finally I wiggle the mouse at the right end of the tab bar where I would have expected the second tab to appear, just to emphasize the point before ending the recording. binary.plist.mp4 |
It appears that VS Code restricts extensions from accessing files larger than 50MB (microsoft/vscode#31078). You can use Sublime Text with the BinaryPlist package for these files. |
I suppose that's a good solution, but I'm aiming for eventually creating a program or script that will do the editing for me, with as few external components as possible. Those links suggest that Python might be a good language to write this script in; do you have any better suggestions? (So far, my experience with Python is limited to the PythonScript extension for Notepad++.) |
This extension uses Python on Windows and Linux for the binary conversion if it is installed. It's pretty straightforward to load a binary plist, make changes, and save it again as binary: import plistlib
plist_path = 'path/to/your/file.plist'
plist_file = open(plist_path, 'rb')
plist_data = plistlib.load(plist_file)
plist_file.close()
# make changes
print(plist_data)
plist_file = open(plist_path, 'wb')
plistlib.dump(plist_data, plist_file)
plist_file.close() |
Your project page says "another tab will open in XML", but this isn't happening for me. The one tab that does open looks a lot like XML, but with regions of nothing but control characters interspersed. What might I need and not have for this to work?
The text was updated successfully, but these errors were encountered: