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

Change color scheme doesn't work in ST4 #595

Closed
igor-kupczynski opened this issue Feb 28, 2021 · 2 comments · Fixed by #607
Closed

Change color scheme doesn't work in ST4 #595

igor-kupczynski opened this issue Feb 28, 2021 · 2 comments · Fixed by #607

Comments

@igor-kupczynski
Copy link

When selecting MarkdownEditing: Change color scheme ... in ST4 on macOS it opens the file, but doesn't show the theme preview window:

Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1494, in run_
    return self.run(edit)
  File "/Users/igor/Library/Application Support/Sublime Text 3/Installed Packages/MarkdownEditing.sublime-package/bootstrap.py", line 158, in run
  File "/Users/igor/Library/Application Support/Sublime Text 3/Installed Packages/MarkdownEditing.sublime-package/bootstrap.py", line 105, in choose_color_theme
  File "/Users/igor/Library/Application Support/Sublime Text 3/Installed Packages/MarkdownEditing.sublime-package/bootstrap.py", line 105, in <listcomp>
AttributeError: 'NoneType' object has no attribute 'group'
deathaxe added a commit that referenced this issue May 12, 2021
Fixes #567
Fixes #595

This commit...

1. moves MdeColorActivate to color_schemes.py
2. renames it to MdeSelectColorScheme
3. renames the menu/command caption to "Select Color Scheme", which is
   the term used by ST's core "UI: Select Color Scheme" command.

   Note: Maybe a general "Select Syntax Specific Color Scheme" was an
   overall better solution, but that's out of scope of this package.

The new command

1. Enumerates all existing "MarkdownEditor*.sublime-color-scheme" files,
   so users or other packages can add their own color schemes.
2. Applies the color scheme to the markdown syntax of the current view.
   Means: If the current view is set to MultiMarkdown, the chosen color
   scheme is written to MultiMarkdown.sublime-settings instead of
   Markdown.sublime-settings. This is to enable the functionality for
   all markdown flavors.
3. The "Global" Color Scheme is moved to the top of the selection list
   and is the default. The package no longer enforces "MarkdownEditor"
   as default color scheme. A user must decide to use a syntax specific
   color scheme as of now.
4. The global color scheme is applied by removing the syntax specific
   color_scheme setting so later changes to the global color scheme
   don't prevent Markdown files from changing, too.
@deathaxe deathaxe added the bug label May 13, 2021
@deathaxe deathaxe mentioned this issue May 14, 2021
@tukusejssirs
Copy link

It doesn’t work on Linux either. I have just installed the plugin, it complains about error: Error loading syntax file "Packages/Markdown/Markdown.sublime-syntax": Unable to read Packages/Markdown/Markdown.sublime-syntax. I tried restarting ST4, but it does not fix the issue.

My issue might be a bit different though. After I installed the plugin via Package Control, it didn’t create any folder under Packages/, i.e. neither Markdown/ nor MarkdownEditing/, therefore I seems like not all files are downloaded and placed to their respective locations.

BTW, I have installed v2.2.9.

@bear-jordan
Copy link

bear-jordan commented Jul 13, 2021

Check out post 485 for the syntax file.

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

Successfully merging a pull request may close this issue.

4 participants