Skip to content

Opening files in _ascii_ encoding #29

@h8nor

Description

@h8nor

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions