Skip to content
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

Opening files in _ascii_ encoding #29

Open
h8nor opened this issue Mar 31, 2022 · 3 comments
Open

Opening files in _ascii_ encoding #29

h8nor opened this issue Mar 31, 2022 · 3 comments

Comments

@h8nor
Copy link
Contributor

h8nor commented Mar 31, 2022

Added ability to manage the editor's settings extension https://code.visualstudio.com/updates/v1_63#_configuration-defaults-overrides
I would like to open the files *.bas in the encoding of ascii (required condition for import modules).

	"contributes": {
		
		"configuration": {
			"title": "VBA",
			"type": "object",
			"properties": {
				"vscodeVBA.Charset": {
					"type": "string",
					"enum": [
						"windows1250",
						"windows1251",
						"windows1252",
						"windows1253",
						"windows1254",
						"windows1255",
						"windows1256",
						"windows1257",
						"windows1258"
					],
					"description": "Default charset vba file",
					"default": "windows1250"
				}
			}
		},
		"configurationDefaults": {
			"[cls][frm][vba]": {
				"editor.rulers": [
					{
						"column": 80,
						"color": "#ff0000"
					}
				],
				"files.encoding": "${vscode.workspace.getConfiguration('vscodeVBA').get('Charset') as 'windows1250' || 'windows1251' || 'windows1252' || 'windows1253' || 'windows1254' || 'windows1255' || 'windows1256' || 'windows1257' || 'windows1258';}"
			}
		},
		
        }

It is impossible to apply directly object and properties, so debugger requires value from enums for vscodeVBA.Charset. It was assumed that user itself would configure ascii code page that meets its language.

Also added the boundaries of characters on a string (ruler) that work in the setting.

Unfortunately, I do not have enough knowledge to compile src. Maybe you will have opportunity to realize the idea.

@serkonda7
Copy link
Owner

Really good idea. This should reduce possible encoding incompatibilities with Office's VBA Editor.

At the moment, I have limited time so this might take a while for me but I could add instructions on how to work on the extension some time soon.

@h8nor
Copy link
Contributor Author

h8nor commented Mar 31, 2022

@serkonda7 it'll be generously on your part. I'm interested in contribution of this useful extension.

@h8nor
Copy link
Contributor Author

h8nor commented Jul 28, 2023

Non obvious problem in the vscode when comparing commits. We must use an additional setting for our formats.

https://code.visualstudio.com/updates/v1_48#_browser-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants