Giter VIP home page Giter VIP logo

schemr's Introduction

About

![Gitter](https://badges.gitter.im/Join Chat.svg)

Schemr allows you to quickly change your color scheme using the command palette and keyboard shortcuts. With Schemr, you get commands to easily cycle forward, backward and randomly through your available color schemes.

Features

  • Full compatibility with Sublime Text 2 and 3.
  • Preview the selected color scheme as you navigate through the quick panel. [ST3 ONLY]
  • Color schemes can be favorited for even faster access.
  • Set syntax-specific color schemes for your favorite languages. Use your favorite schemes for your favorite languages!
  • Displays [Dark] or [Light] in the scheme list to easily filter by type.
  • Automatically loads all available .tmTheme files, including those found inside .sublime-package files.

Installation

Install Schemr through Package Control, or download and extract it into your Sublime Text Packages folder.

Contributors

  • Max - Favorites support and code refactoring

Usage

Schemr: List schemes displays all the available schemes in alphabetical order.

  • Default binding: Alt+F5 (Windows/Linux) Option+F5 (OSX)

Schemr: Next scheme switches immediately to the alphabetically next color scheme.

  • Default binding: Alt+F7 (Windows/Linux) Option+F7 (OSX)

Schemr: Previous scheme switches immediately to the alphabetically previous color scheme.

  • Default binding: Alt+F8 (Windows/Linux) Option+F8 (OSX)

Schemr: Random scheme switches immediately to a random color scheme that you have installed.

  • Default binding: Alt+F10 (Windows/Linux) Option+F10 (OSX)

Favorites

Schemr: Add current scheme to favorites and Schemr: Remove current scheme from favorites add and remove the currently selected color scheme to your favorites list.

  • You can also edit your favorites list manually through Preferences > Package Settings > Schemr.

Schemr: List favorite schemes displays your favorite schemes in alphabetical order.

  • Default binding: Alt+Shift+F5 (Windows/Linux) Option+Shift+F5 (OSX)

Schemr: Next favorite scheme switches immediately to the alphabetically next color scheme in your favorites.

  • Default binding: Alt+Shift+F7 (Windows/Linux) Option+Shift+F7 (OSX)

Schemr: Previous favorite scheme switches immediately to the alphabetically previous color scheme in your favorites.

  • Default binding: Alt+Shift+F8 (Windows/Linux) Option+Shift+F8 (OSX)

Schemr: Random favorite scheme switches immediately to a random color scheme in your favorites.

  • Default binding: Alt+Shift+F10 (Windows/Linux) Option+Shift+F10 (OSX)

Syntax Specific Settings

Syntax specific color schemes will override the behavior of all other commands for listing and switching schemes! Reset the syntax specific scheme setting to return to the normal behavior.

Schemr: Set scheme for current syntax displays the scheme selection list to choose a color scheme for the syntax mode of the current file.

Schemr: Reset scheme for current syntax removes the color scheme setting for the syntax mode of the current file. Only available if a syntax specific color scheme has been set.

User Settings

These settings are available to control some of Schemr's behavior. Add them to Preferences.sublime-settings if you wish to override the default value.

schemr_brightness_threshold: Integer 0-255. Defaults to 100.

The brightness theshold setting allows you to define where the cutoff occurs between Dark and Light themes. Higher values indicate increasing brightess approaching white, while lower values indicate decreasing brightess approaching black.

schemr_brightness_flags: Boolean true|false. Defaults to true.

The brightness flags setting allows you to disable the "[Dark]" or "[Light]" text that appears after the scheme name in the quick panel. Disabling this will turn off color scheme parsing entirely and may increase performance if you have a large number of schemes.

schemr_preview_selection: Boolean true|false. Defaults to true.

If you are using Sublime Text 3, you can enable/disable previewing the highlighted color scheme as you move through the scheme list. Some performance issues related to the SublimeLinter and Color Highlighter plugins may be resolved by disabling this setting.

To improve the user experience, Schemr filters schemes that contain (SL) or (Color Highlighter) from being listed or activated with Schemr commands. These schemes can still be enabled manually through the application menu or user settings file.

If a color scheme does not define colors for the SublimeLinter or Color Highlighter, the scheme file is extended and the written to a file in the Packages/User directory. If you switch between a lot of schemes this can quickly pollute the scheme list with many duplicates. Activate the base color scheme through Schemr and SublimeLinter/Color Highlighter will switch to their version automatically.

schemr's People

Contributors

benweier avatar dsego avatar gitter-badger avatar guilhermehideki avatar paultreny avatar philoserf avatar syntaxcoloring avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

schemr's Issues

Add support for ".sublime-color-scheme"

Schemer ignores the newest themes with ".sublime-color-scheme" extensions.
I guess changing the lines 35, 42, 48 and 231 with the extensions can fix it.

ie.
231
regex = re.compile('(\ (SL))|(\ Color\ Highlighter)?(.tmTheme|.sublime-color-scheme)', re.IGNORECASE)

Thanks

ST3 Support

Is support for ST3 even possible (what with the .tmThemes being inside .sublime-packages)?

Exclude SublimeLinter-generated *.(SL).tmTheme files

SublimeLinter adds following elements to each selected tmTheme and automatically creates a duplicate file appending the "(SL)" string to the file name

<dict>
    <string>SublimeLinter Error</string>
    <dict>
        <key>foreground</key>
        <string>#D02000</string>
    </dict>
...

it would be great to avoid generation of these SL-files, however may not be possible to do it with Schemr

At least filtering the list of themes (excluding SL) would be already helpful

Differentiate between bright and dark schemes

When I am browsing for schemes it is really hard on the eye to switch between dark and bright schemes rapidly. I'd love to be able to filter for dark schemes only. You could also display that in the quick_panel when listing all schemes without filter.

You would have to either use a regular expression on the schemes or parse them completely and probably better cache the results for each theme so you don't have to parse them again every time you open the panel. You can use plistlib, which is provided by ST for most cases. On some Linux dists this is not available, which is why I am providing an external plist parser lib on PackageDev. More context.

Problem with non existing (zip-)file.

Installed Schemr ~5min ago. Couldn't run Schemr: list schemes after installation.

Sublime Text 2 console shows:

IOError: [Errno 2] No such file or directory: '/Users/ben/Library/Application Support/Sublime Text 2/Packages/Color Scheme - Default.sublime-package'
Traceback (most recent call last):
File "./sublime_plugin.py", line 339, in run_
File "./schemr.py", line 60, in run
File "./schemr.py", line 22, in load_schemes
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/zipfile.py", line 683, in init
self.fp = open(file, modeDict[mode])

After removing line 22-27 in schemr.py, everything works fine.

using Sublime Text Version 2.0.1, Build 2217 on MacOS

Nothing is working

Really, nothing works at all. As well as the shortkeys as selecting, listing or anything trough the command pallette.

I don't know if there are know issues with other packages? I only installed "ColorsShemeSelector" after I installed Schemr and found out Schemr didn't work. And it works perfectly

list_schemes (CMD + F5) stopped working

Hello,

ST v3 (build 3114) on OS X 10.11.6

Schemr's list_schemes was working fine but suddenly it is not!

I have the following in my keymap-user:
{"keys": ["super+f5"], "command": "schemr_list_schemes"},

Even running the schemr_list_schemes directly returns nothing!
the next & previous are still functioning though!

Any thoughts?

schemr List all scheme not working on windows(64) sublime 3 build 3114

I have installed latest sublime text 3 build: 3114.
I can change to next/previous scheme. Assign random screen
But unable to see list of all scheme on schemr with both keyboard shortcut and from ctrl+shift+p

Please let me know if I need to provide any details

reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.02-bz2
reloading plugin Origami.origami
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin Schemr.schemr
plugins loaded
Package Control: Skipping automatic upgrade, last run at 2016-05-25 15:08:21, next run at 2016-05-25 16:08:21 or after
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 553, in run_
return self.run()
File "schemr in C:\Users\me\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 247, in run
File "schemr in C:\Users\me\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 99, in list_schemes
File "schemr in C:\Users\me\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 205, in parse_scheme
NameError: global name 'a' is not defined

Schemr parse error

I haven't tried to use schemr to change my color scheme lately (probably in 2 weeks at least). This morning I loaded a new scheme; when I try to use schemr to list or switch schemes, I get the errors below. I thought it might be an issue with the particular color scheme listed, so I removed it from sublime, but then I just got the error on a different scheme. If you need any more info, please let me know!

found 44 files for base name Main.sublime-menu
Traceback (most recent call last):
File "lib.plist_parser in C:\Users\somebody\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 253, in _parse_using_etree
File "X/xml/etree/ElementTree.py", line 1763, in next
File "X/xml/etree/ElementTree.py", line 1775, in next
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 6, column 34

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "schemr in C:\Users\somebody\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 25, in parse_scheme
File "lib.plist_parser in C:\Users\somebody\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 303, in parse_string
File "lib.plist_parser in C:\Users\somebody\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 294, in parse
File "lib.plist_parser in C:\Users\somebody\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 265, in _parse_using_etree
Schemr.lib.plist_parser.PropertyListParseError: not well-formed (invalid token): line 6, column 34

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 524, in run_
return self.run(**args)
File "schemr in C:\Users\somebody\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 224, in run
File "schemr in C:\Users\somebody\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 83, in load_schemes
File "schemr in C:\Users\somebody\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 28, in parse_scheme
File "lib.plist_parser in C:\Users\somebody\AppData\Roaming\Sublime Text 3\Installed Packages\Schemr.sublime-package", line 309, in parse_file
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\somebody\AppData\Roaming\Sublime Text 3\Packages\Color Scheme - saulhudson/Citizen-Bane.tmTheme'

Themes inside folders inside packages

There seems to be an issue with Schemr and themes inside folders inside packages (i.e., Packages/Some Package/Folder/Whatever.tmTheme). The themes are shown in the command palette but they fail to load properly. It looks like Schemr eats up some of the path, so in my example above, Schemr would try to open Packages/Folder/Whatever.tmTheme, and thus fail to open the theme.

Scheme specific to syntax

Just thinking out loud here, would it be possible to detect when the active opened file has a syntax specific color scheme, and change that instead of the scheme specified in Preferences?

BUG: Schemr Gets Stuck on Old Schemes

There are certain color schemes that Schemr will not go past. I can still go to a previous scheme from there, but it goes back 2 schemes instead of the one immediately previous. When you use the keybind or menu item for next on these certain schemes, however, it just stays put. The schemes that this happens on don't seem to change the visible colors at all.

Here are some that I've found this to happen on:

  • Packages/Material Theme/schemes/OLD/Material-Theme.tmTheme
  • Packages/Material Theme/schemes/OLD/Material-Theme-Darker.tmTheme
  • Packages/Material Theme/schemes/OLD/Material-Theme-Lighter.tmTheme
  • Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme
  • Packages/Dracula Color Scheme/visual-studio-code/theme-dracula/themes/Dracula.tmTheme

The only way I can get past these schemes is to list all schemes and select the next one in the list.

Doesn't set the correct path for theme files in the Packages folder

It recognises the theme and offers it in the command panel, but sets the wrong path in the user settings file:

"color_scheme": "Packages/Packages/Birds of Paradise.tmTheme",

Choosing the theme from the Preferences menu works as expected:

"color_scheme": "Packages/Birds of Paradise.tmTheme"

Version is 2012.07.18.19.20.44

Does not show ST3 default color schemes

First, I'm always messing with my colors - so I like the plugin!

This does not seem to show the built-in (default) color schemes for Sublime Text 3. Any way to get these to show up?
20130712_144826
20130712_144949

Favorite-related actions don't show up on the Command Palette

Environment:

OS X 10.9.4
ST 2.0.2. Build 2221
Schemr 2014.05.19.13.12.41

Problem:

Upon plugin installation, when I bring the command palette the only Schemr commands available are:

  • Next scheme
  • Previous scheme
  • Random scheme
  • List all schemes
  • List favorite schemes

The Favorite/Unfavorite current scheme are not available (the Next/Prev/Random Favorite commands are not available either but that makes sense in this context, since there are no favorites yet).

Bringing up the command palette generates this output in the console:

Traceback (most recent call last):
  File "./sublime_plugin.py", line 270, in is_enabled_
  File "./schemr.py", line 246, in is_enabled
  File "./schemr.py", line 203, in find_scheme
AttributeError: 'module' object has no attribute 'find_resources'
Traceback (most recent call last):
  File "./sublime_plugin.py", line 270, in is_enabled_
  File "./schemr.py", line 257, in is_enabled
  File "./schemr.py", line 203, in find_scheme
AttributeError: 'module' object has no attribute 'find_resources'

After manually adding a couple of schemes to the user .sublime-settings the next/prev/random commands become available, but still no command to favorite/unfavorite.

Thanks for your work and help!

[Feature request] StThemr

Many settings for elements in panels and concoles in Sublime Text is situated in stTheme files. Could you make a plugin that would allow a choice between stTheme files, which would work on the same principle as the Themr and Schemr?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.