Sublime Forum

Table of Key Bindings

#61

Hi @vwheeler63. FYI Only.

I just tried this plugin on MacOS Tahoe 26.5.1 running ST4200
All of the menu commands are greyed out. The console is full of errors.

Not sure if there is a configuration process that is needed before the first run?

Edit: Also added as an issue to your GitHub repo if it helps you track this back.

1 Like

#62

Thank you, Greg!!

I see I my test environment needs some adjustment: I developed this whole thing while using Python 3.14 within Sublime Text, which has some differences in the typing syntax. I will need to drop my test/dev environment back to 3.8 to fix that.

I’m going to need to get some sleep now, but I will be on this first thing in the morning (my time zone is US Mountain Daylight Time: GMT-6). I expect to have version 1.1 out by noon or so. I’ll give you a heads-up.

Kind regards,
Vic

0 Likes

#63

Please make no effort to fix things on my behalf. This is very much an awareness-raising rather than a call-to-action.

I was on ST dev release, but downgraded due to incompatibilities with some of the plugins I rely on. I am more than happy to wait until the next stable release of ST, with Py 3.14.

All of that said, I am more than happy to be your MacOS Beta tester, if you need anyone to smoke test it.

0 Likes

#64

Hi, Greg! ( @gbird )

I’m on it. Actually, rolling back to build 4200 (Python 3.8) I see I made a big mess of things! I changed a lot of syntax thinking it would be fine in 3.8 and I was wrong! This is going to be a good learning experience for me to see exactly what changed, and the things I need to “leave alone” in Python 3.14. I should have thought to roll back my installation to build 4200 while I was testing. *rolling eyes at myself*

Anyway, I had the free time (luckily) and no it’s not just for you, but because I want EVERYONE to be able to benefit from this Package.

Gosh, yes, your offer to beta test with MacOS is VERY welcome! I’ll be in touch (also via the issue you kindly registered). :slight_smile:

Kind regards,
Vic

0 Likes

#65

P.S. I’m actually kind of surprised that LSP-pyright didn’t pick these up… ! They are all simple issues in the typing syntax, between 3.8 and 3.14…

Example (works in 3.14 but not in 3.8):

    def __init__(
            self,
            path      : str,
            content   : str | None,
            tabTrigger: str | None,
            scope     : str | None,
            desc      : str | None):

whereas this works in both:

    def __init__(
            self,
            path      : str,
            content   : Union[str, None],
            tabTrigger: Union[str, None],
            scope     : Union[str, None],
            desc      : Union[str, None]):
0 Likes

#66

Don’t know why pyright didn’t pick up but you may want from __future__ import annotations to support the newer syntax.

Union[str, None] was always typed as Optional[str], but newer syntax is str | None.

1 Like

#67

Good to know, thank you!!

0 Likes

#68

Greg: version 1.1.0 is released. It should fix the load failure (which I’m pretty sure was causing the menu items to be grayed out, because the Commands literally had not arrived in the global Command namespace yet).

I’m back to build 4200 now for building Packages! :roll_eyes:

Please let me know how it goes.

Kind regards,
Vic

0 Likes

#69

Pyright can warn about incompatible syntax, but you need to specify the Python version in its configuration file (pyrightconfig.json or in pyproject.toml), for example

[tool.pyright]
pythonVersion = "3.8"
0 Likes

#70

Hey @vwheeler63. I’ve deployed v.1.1.0 of the plugin. This might be two steps forward, one giant leap back. - at least for me.

The menu systems are no longer greyed out, but when I attempt to run any menu items, I get console errors like the following:

The bigger issue is that the plugin appears to break almost all key commands … EVERYWHERE, for every plugin and core capability. For instance, I can no longer create a new file, copy or paste from keybindings. It is almost as if, once your plugin loads, it hijacks native keybindings from loading.

If it is robust and functioning in py 3.14, then it might be worth holding out until this is shipped.
Happy to re-tet future versions

0 Likes

#71

Excellent!!

0 Likes

#72

Hi, Greg! ( @gbird )

Thank you for your willingness. Wow, now I am wishing I had a OSX machine here to test with. I agree, there is certainly something conflicting. One thing it does is load up a nearly complete set of on_query_context() listeners to take part in context tests, when they apply. It’s making me think that is having some sort of side effect on your machine. Can you give me a better view of the first screenshot—the one showing a traceback from an exception? (On my end, the screenshot is cut off before it says what the exception is (at the bottom) and where it came from.)

On my side, I’ve tested it in Windows 3.14, 3.8 and Linux 3.14 though I need to try it in 3.8, and all of the reports work (tested each one). Here is a screenshot from the Number Keys bindings report (no output to the console).

Edit:

In fact, would you be so kind as to:

  • do a fresh ST startup
  • attempt to run Tools > Key Bindings Report > Outlined Format > Default Package > Number Keys
  • send me (perhaps on your GitHub issue) a copy/paste of your entire Console Panel content?
0 Likes

#73

Hey @vwheeler63. I have fully removed your package, then performed a clean instal of 1.1.0.

On fresh install, this is what appears in my console:

Package Control: Installed package "KeyBindingReport" 1.1.0
Package Control: The library "lxml" is not available for Python 3.3
Package Control: Package KeyBindingReport successfully installed
ignored packages updated to: ["A File Icon", "AcademicMarkdown", "Chain of Command", "Color Highlight", "Data Wizard", "Emmet Css Snippets", "Extract Lines", "Filter Lines", "FolderAlias Rename Tool", "FoldFunctions", "FuzzyFilePath", "GitGutter", "GitHub Markdown Snippets", "Gutter Color", "Highlight", "Highlight Dodgy Chars", "Highlight Duplicates", "HighlightWords", "HTML Nest Comments", "HTML2Text", "Icon Fonts", "Idiomatic-CSS-Comments-Snippets", "IntelliDocs", "JavaScript Completions", "jQuery", "jQueryDocs", "JS Template String Converter", "Json Colors And Navigation", "JsPrettier", "Keymaps", "LanguageTool", "Libraries from CDN", "LiveReload", "LiveServer", "LiveServerPlus", "LiveStyle", "Markdown Table of Contents", "MarkdownLivePreview", "MarkdownPreview", "MarkerStack", "Monokai Neue", "MonokaiC", "More Python Completions", "Nord", "OpenUri", "PackageResourceViewer", "Pastery", "Pieces", "Prettierd Format", "Pretty JSON", "PrintDebugger", "Python Completions", "Python Flake8 Lint", "python-black", "QuickLineNavigator", "QuoteHTML", "rainbow_csv", "RainbowIndent", "Random Everything", "RawLineEdit", "RegexLab", "RegReplace", "RoadBookmarks", "SASS Build", "SassBeautify", "SasSubmit", "Schemr", "SCSS Compiler", "Select Quoted", "SimpleClone", "Slugify", "Smart Delete", "Smart Title Case", "SqlBeautifier", "Status Bar JsonPath", "StickySearch", "Stringify", "Sublime Tutor", "SublimeCodeIntel", "SublimeLinter", "SublimeLinter-contrib-scss-lint", "SublimeLinter-csslint", "SublimeLinter-flake8", "SublimeLinter-html-tidy", "SublimeLinter-jshint", "SublimeLinter-xmllint", "Table Editor", "TabSnippets", "Terminus", "Text Highlighter", "Theme - Monokai Pro", "Toggle Sidebar and Reveal Current File", "Unsplash", "Vintage", "xpath"]
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
reloading plugin KeyBindingReport.keybindingreport
AttributeError: module 'sublime_plugin' has no attribute 'create_text_commands'
AttributeError: module 'sublime_plugin' has no attribute 'create_window_commands'
AttributeError: module 'sublime_plugin' has no attribute 'notify_application_commands'
AttributeError: module 'sublime_plugin' has no attribute 'synthesize_on_activated_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_hover'
Package Control: resuming indexer
reloading settings Packages/User/Preferences.sublime-settings
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated'
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_activated'
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated'
AttributeError: module 'sublime_plugin' has no attribute 'on_activated_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated_async'

On restart, I get these errors (there is a fair bit of noise in this):


AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer'
AttributeError: module 'sublime' has no attribute 'Syntax'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 568, in on_api_ready
    attach_view(v)
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 636, in attach_view
    check_view_event_listeners(view)
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 627, in check_view_event_listeners
    listeners.append(cls(view))
  File "/Users/gbird/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/documents.py", line 226, in __init__
  File "/Users/gbird/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/documents.py", line 235, in _setup
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime.py", line 3505, in syntax
    return syntax_from_path(path)
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime.py", line 4224, in syntax_from_path
    return sublime_api.get_syntax(path)
SystemError: <built-in function get_syntax> returned a result with an error set
OmniMarkupPreviewer: [INFO] Bottle v0.11.6 server starting up...
OmniMarkupPreviewer: [INFO] Listening on http://127.0.0.1:51004/
Exception ignored in: <function DocumentSyncListener.__del__ at 0x10524d700>
Traceback (most recent call last):
  File "/Users/gbird/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/documents.py", line 229, in __del__
  File "/Users/gbird/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/documents.py", line 257, in _cleanup
  File "/Users/gbird/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/documents.py", line 1109, in _clear_session_views_async
AttributeError: 'DocumentSyncListener' object has no attribute '_session_views'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer'
AttributeError: module 'sublime_plugin' has no attribute 'create_text_commands'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer'
AttributeError: module 'sublime_plugin' has no attribute 'create_text_commands'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer_async'
AttributeError: module 'sublime_plugin' has no attribute 'synthesize_on_activated_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer_async'
AttributeError: module 'sublime_plugin' has no attribute 'create_text_commands'
AttributeError: module 'sublime_plugin' has no attribute 'create_window_commands'
AttributeError: module 'sublime_plugin' has no attribute 'on_window_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer'
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated'
AttributeError: module 'sublime_plugin' has no attribute 'on_activated'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_window_command'
OmniMarkupPreviewer: [INFO] Loaded renderer: MarkdownRenderer
AttributeError: module 'sublime_plugin' has no attribute 'on_new_buffer_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_activated_async'

After restart, my console qickly fills up with these types of message. Almost all keybindings are broken (eg if I attempt ‘CMD + C’ for copy):


AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated'
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_activated'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_activated_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_hover'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated'
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_activated'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_activated_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_selection_modified_async'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_post_text_command'
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated'
AttributeError: module 'sublime_plugin' has no attribute 'on_deactivated_async'

I am unable to run most of your commands as the menu systems are greyed out:

The only ones that are not greyed out do nothing:

0 Likes

#74

Wow… I THINK that means some of the commands aren’t loading at all… I am at a loss about what us causing the AttributeErrors. None of them are even named in my Package, so I’m guessing it is causing some other kind of conflict, and the only one I can think of is that I literally load all the .py modules in the whole system that have on_query_context() functions in them (and keep a reference to just those modules) so that function can be called as part of context testing. I’m betting one or more of them is being loaded that is normally not loaded and it is causing the conflict(s), and I’m further betting that if I turned that feature off (I’m thinking I could create a configuration item to turn it off).

I was expecting your Console Panel would have exceptions in it connected to loading the Package and/or executing commands. Were there any?

For what it’s worth, a custom call to the main report command generated 99.5% of the source for this web page: http://crystal-clear-research.com/docs/quickrefs/sublime_text/default_key_bindings_osx.html But it’s running under Windows 10, and I only have 24 Packages installed, and 10 of those are LSP-... Packages, and 2 are ignored.

I’m going to continue this conversation in one of the issues you registered on GitHub, as I have some debug steps that would generate output I would very much like to see.

0 Likes

#75

Confirmed: pythonVersion = "3.8" does indeed make LSP-pyright detect and flag it:

image

I had it set to “3.14” and had forgotten that I had done this.

Thank you again!!
Kind regards,
Vic

0 Likes