Code Monkey home page Code Monkey logo

scopehunter's People

Contributors

evandrocoan avatar facelessuser avatar jfcherng 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  avatar

scopehunter's Issues

Feature request - On-the-fly editing of tmTheme file.

@facelessuser First of all a big thank you for putting out so much awesome plugins for sublime like ScopeHunter, ColorSchemeEditor and RegReplace!

I am using ScopeHunter and ColorScheme editor in conjunction to edit thTheme files.

My workflow includes having opened both the respective tmTheme file and an example file for the respective language, covering as completely as possible all syntax elements/ scopes.

ScopeHunter presents me with a nice popup showing the respective scope, fore- and background color.

I can then use the scope string to find the respective portion in the tmTheme file to edit the color according to my wishes. (I know ColorSchemeEditor can put me right at the scope defintion of the color scheme file. Yet, there appears to be a bug that makes using ColorSchemeEditor in that way impossible. Namely clicking into the tmTheme file will make the viewport jump to an entirely different location of that file. Editing is rendered impossible. This is worthy of an issue filing in itself. And even if it worked it still not the best imaginable solution.)

This process works but is very cumbersome.

The following would be a big improvement, allowing on-the-fly color adjustments of a scheme.

Just allow picking colors right from ScopeHunter's popup. The user may either input a new hex color or optionally use a color picker. The plugin then handles the modification of the tmTheme file all by itself.

The modification of the theme file then automatically change the coloring of any affected file. Providing the user with instant feedback.

This would allow for the most easy way to adjust color schemes.

Many of the required function are already implemented other plugins of yours, like the parsing of the tmTheme file or a color picker in ColorHelper. They just need to be put together in a new way.

Of course there is ColorSchemeEditor and ColorHelper but none make it as easy to edit a color scheme.

Put exception output when color scheme file does not exist under debug switch

This is related to my InactivePanes package, which (at the moment) periodically clears its cache of generated color schemes, but can't remove all references to these files from other projects because there is no "on window close" event, so the view ends up with a pointer to a non-existant color scheme for a very short time. It's enough to generate several error messages from Sublime Text and cause the following exception however:

Traceback (most recent call last):
  File "scope_hunter in C:\Users\Fichte\AppData\Roaming\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 718, in init_color_scheme
  File "lib.color_scheme_matcher in C:\Users\Fichte\AppData\Roaming\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 71, in __init__
  File "C:\Program Files\Sublime Text 3\sublime.py", line 146, in load_binary_resource
    raise IOError("resource not found")
OSError: resource not found

What follows are two more exceptions that are caused by Python-internal traceback printing and the way SublimeText loads Python files from zip archives, but that is irrelevant.

Auto-detect light or dark css

Since you are inspecting the schemes anyway it would be a piece of a cake to auto-detect whether the user would prefer the dark or the light style for the popup. I suggest to use the setting "auto" for that and make it the default.

Build 3083, AttributeError: 'NoneType' object has no attribute 'is_enabled'

On Sublime Text build 3083 I'm getting <see below> every time I toggle instant scoper:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Sublime Text 3\sublime_plugin.py", line 288, in on_selection_modified
    callback.on_selection_modified(v)
  File "scope_hunter in C:\Users\twing\AppData\Roaming\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 622, in on_selection_modified
AttributeError: 'NoneType' object has no attribute 'is_enabled'
Traceback (most recent call last):
  File "C:\Program Files (x86)\Sublime Text 3\sublime_plugin.py", line 288, in on_selection_modified
    callback.on_selection_modified(v)
  File "scope_hunter in C:\Users\twing\AppData\Roaming\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 622, in on_selection_modified
AttributeError: 'NoneType' object has no attribute 'is_enabled'
Traceback (most recent call last):
  File "C:\Program Files (x86)\Sublime Text 3\sublime_plugin.py", line 520, in run_
    return self.run()
  File "scope_hunter in C:\Users\twing\AppData\Roaming\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 591, in run
AttributeError: 'NoneType' object has no attribute 'instant_scoper'
Traceback (most recent call last):
  File "C:\Program Files (x86)\Sublime Text 3\sublime_plugin.py", line 288, in on_selection_modified
    callback.on_selection_modified(v)
  File "scope_hunter in C:\Users\twing\AppData\Roaming\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 622, in on_selection_modified
AttributeError: 'NoneType' object has no attribute 'is_enabled'
Traceback (most recent call last):
  File "C:\Program Files (x86)\Sublime Text 3\sublime_plugin.py", line 288, in on_selection_modified
    callback.on_selection_modified(v)
  File "scope_hunter in C:\Users\twing\AppData\Roaming\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 622, in on_selection_modified
AttributeError: 'NoneType' object has no attribute 'is_enabled'

"ScopeHunter ST3 2.0.2 + certain color scheme" = ST no response

For example, I personally use Monokai Soda.tmTheme from the Soda color schemes.
After upgrade to ScopeHunter ST3 2.0.2, ST starts up and immediately goes no response.

I have tested this on a clean copy of ST 3095.

Unzip ST 3095 portable ->
install package control ->
install ScopeHunter ->
put Monokai Soda.tmTheme in Packages/my_theme ->
add "color_scheme": "Packages/my_theme/Monokai Soda.tmTheme", to preference ->
restart ST ->
ST goes no response without an error

Don't run ScopeHunter, Windows XP SP3, Sublime Text 3

Occurs nothing when I direct the cursor at any objects.

ScopeHunter Bad

Log of installation:

reloading Packages/User/Preferences.sublime-settings
ignored packages updated to: ["ScopeHunter", "Vintage"]
reloading Packages/User/Package Control.sublime-settings
reloading Packages/User/Preferences.sublime-settings
Package Control: The dependency python-markdown is not currently installed; installing
Package Control: The dependency python-markdown has successfully been installed or updated
Package Control: The dependency mdpopups is not currently installed; installing
Package Control: The dependency mdpopups has successfully been installed or updated
Package Control: The dependency python-jinja2 is not currently installed; installing
ignored packages updated to: ["0_package_control_loader", "ScopeHunter", "Vintage"]
unloading plugin 0_package_control_loader.00-package_control
unloading plugin 0_package_control_loader.01-pygments
unloading plugin 0_package_control_loader.02-bz2
unloading plugin 0_package_control_loader.50-backrefs
unloading plugin 0_package_control_loader.50-python-markdown
unloading plugin 0_package_control_loader.50-pyyaml
unloading plugin 0_package_control_loader.50-requests
unloading plugin 0_package_control_loader.51-python-jinja2
reloading Packages/User/Package Control.sublime-settings
Package Control: The dependency python-jinja2 has successfully been installed or updated
Package Control: The dependency markupsafe is not currently installed; installing
reloading Packages/User/Preferences.sublime-settings
Package Control: The dependency markupsafe has successfully been installed or updated
ignored packages updated to: ["ScopeHunter", "Vintage"]
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.01-pygments
reloading plugin 0_package_control_loader.02-bz2
reloading plugin 0_package_control_loader.50-backrefs
reloading plugin 0_package_control_loader.50-markupsafe
reloading plugin 0_package_control_loader.50-pyyaml
reloading plugin 0_package_control_loader.50-requests
reloading plugin 0_package_control_loader.51-python-jinja2
reloading Packages/User/Package Control.sublime-settings
reloading Packages/User/Preferences.sublime-settings
reloading Packages/User/Preferences.sublime-settings
ignored packages updated to: ["Vintage"]
reloading plugin ScopeHunter.scope_hunter
reloading Packages/ScopeHunter/scope_hunter.sublime-settings
reloading plugin ScopeHunter.scope_hunter_notify
indexing [queue 8]: no files were indexed out of the 2 queued, abandoning crawl
reloading Packages/User/Package Control.sublime-settings
reloading Packages/User/Preferences.sublime-settings
indexing [queue 9]: no files were indexed out of the 2 queued, abandoning crawl
Unable to open /C/Documents and Settings/Admin.USER-AC59577756/Application Data/Sublime Text 3/Packages/ScopeHunter/scope_hunter.sublime-settings

and then there was the following message:

ScopeHunter: Theme parsing failed! Ignoring theme related info.

My color theme is Monokai. Thanks.

Display the actual matching selector (not just the name)

Current behavior:

foreground selector:           Function (definition)

Suggested behavior:

foreground selector:           Function (definition) <entity.name.function>

This also solves use cases where the name is not set.


In a similar regard, I'd prefer if the implicit foreground and background matches from the general settings were highlighted a bit differently so it's easier to see.

And finally, what does "simulated trans" mean? Since it always shows the same as the "normal" color I'd suggest to add an option for hiding it.

UnicodeEncodeError: 'ascii' codec can't encode character

Hello,
I'm on ST2 and I don't know why but I can't get the popup showing.
Also I keep on getting this error and the plugin stops to work:

Traceback (most recent call last):
  File "./scope_hunter.py", line 239, in <lambda>
  File "./scope_hunter.py", line 224, in sh_run
  File "./scope_hunter.py", line 150, in run
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2718' in position 209: ordinal not in range(128)

Here's the list of my plugins:

        "Alignment",
        "AngularJS",
        "ApacheConf.tmLanguage",
        "Autoprefixer",
        "Better Completion",
        "Bower",
        "Bracketeer",
        "BufferScroll",
        "ChangeQuotes",
        "Clipboard History",
        "ColorPick",
        "copy-file-name",
        "CSScomb",
        "DetectSyntax",
        "Display Functions (Java)",
        "Djaneiro",
        "Django Manage Commands",
        "Django-Tools",
        "DocBlockr",
        "Emmet",
        "FileDiffs",
        "Generate Password",
        "Goto Documentation",
        "Goto Symbol",
        "Grunt",
        "HTML5",
        "HtmlTidy",
        "Inc-Dec-Value",
        "Indent XML",
        "iTodo",
        "Jinja2",
        "jQuery",
        "jQuery Snippets pack",
        "JsFormat",
        "JSHint",
        "JsRun",
        "LESS",
        "LiveStyle",
        "MacTerminal",
        "Marked.app Menu",
        "Nettuts+ Fetch",
        "Open-Include",
        "Package Control",
        "Prefixr",
        "Pretty JSON",
        "Print to HTML",
        "ScopeHunter",
        "Sencha",
        "SetDjangoSyntax",
        "SFTP",
        "SideBarEnhancements",
        "SideBarGit",
        "STProjectMaker",
        "Sublime-HTMLPrettify",
        "SublimeCodeIntel",
        "SublimeLinter",
        "SublimeRope",
        "SublimeTODO",
        "SyncedSideBar",
        "Tag",
        "Theme - Flatland",
        "Theme - Nexus",
        "Theme - Spacegray",
        "Tomorrow Color Schemes",
        "Web Inspector"

Scheme not opened correctly on Windows

When clicking the scheme on the popup, the following file is opened:
/C/Users/Fichte/AppData/Roaming/Sublime Text 3/Packages/Packages\Theme - Nil\Tubnil_mod.tmTheme

I think you can see where this goes wrong, but to clarify: ColorSchemeMatcher adjusts its internal path to use the correct os.path.sep but when fetching the scheme as the popup text gets constructed (and the on_navigate targets are established) this is not considered.
Imo, the correct action here would be to not "correct" forwards slashes to backslashes in ColorSchemeMatcher.

Errors on Windows7 with Python3.x installed

Hello Isaac,

after a 2 year abstinence of using Sublime (or any other Text Editor for that matter), I set up Sublime Text 3 (build 3083 currently) on my systems again. And of course started to install my favourite packages on my new Linux box, or update them on my other systems (two Windows 7 desktops and one MacBook Pro). Anyway, let's skip to the issue part...

Because of the plugin WakaTime, I needed to install Python on my Windows machines. Out of curiosity, I installed Python 3.x on one and Python 2.x on the other Windows machine.

I got some very strange errors with ScopeHunter, on both machines, but only in Sublime Text 3--in Sublime Text 2 (yeah, I've installed both on all my machine for testing purposes) it works without any problems!

I removed all packages, settings, cache files/directories & Package Pontrol on both machines and started to install my packages one-by-one (always starting with a theme and ScopeHunter as second). That helped with the machine with Python 2.x.

On the machine with Python 3.x, I get the following error output, after enabling ScopeHunter:

reloading Packages/User/Preferences.sublime-settings
ignored packages updated to: ["Vintage"]
reloading plugin ScopeHunter.scope_hunter
ScopeHunter: Theme parsing failed!  Ingoring theme related info.
Traceback (most recent call last):
    File "scope_hunter in %APPDATA%\Sublime Text 3\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 739, in init_color_scheme
    File "lib.color_scheme_matcher in %APPDATA%\Sublime Text 3\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 49, in __init__
    File "./plistlib.py", line 104, in readPlistFromBytes
    File "./plistlib.py", line 76, in readPlist
    File "./plistlib.py", line 378, in parse xml.parsers.expat.ExpatError: not well-formed (invalid token): line 191, column 18

Traceback (most recent call last):
    File "%PROGRAMFILES%\Sublime Text 3\sublime_plugin.py", line 116, in reload_plugin
    m.plugin_loaded()
    File "scope_hunter in %APPDATA%\Sublime Text 3\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 783, in plugin_loaded
    File "scope_hunter in %APPDATA%\Sublime Text 3\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 765, in init_plugin
    File "scope_hunter in %APPDATA%\Sublime Text 3\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 686, in __init__
    File "scope_hunter in %APPDATA%\Sublime Text 3\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 725, in setup
AttributeError: 'NoneType' object has no attribute 'is_dark_theme'
reloading Packages/ScopeHunter/scope_hunter.sublime-settings
reloading plugin ScopeHunter.scope_hunter_notify

As soon as I click someone in a Sublime Text view with a file loaded, I get the following error message:

Traceback (most recent call last):
    File "%PROGRAMFILES%\Sublime Text 3\sublime_plugin.py", line 288, in on_selection_modified
    callback.on_selection_modified(v)
    File "scope_hunter in %APPDATA%\Sublime Text 3\Installed Packages\ScopeHunter.sublime-package", line 622, in on_selection_modified
AttributeError: 'NoneType' object has no attribute 'is_enabled'

If I open the command palette, and type in scope I only get the menu entry Scope Hunter: Toggle Instant Scoper, the entry Scope Hunter: Show Scope Under Cursor(s) is missing.

There is no difference if I've some entries in the scope_hunter.sublime-settings or not.

Here is my Package Control.sublime-settings:

{
    "in_process_packages":
    [
    ],
    "installed_packages":
    [
        "Package Control",
        "ScopeHunter",
        "Theme - Cola"
    ]
}

Hope that helps.

Tomorrow, I'll de-install Python 3.x and install Python 2.x as well upgrade Sublime Text 3 to build 3094 in order to gather more information.

Take care,
Mick

ScopeHunter fails if tmTheme file contains html comments

I just found that ScopeHunter and a plugin of mine both fail on a particular color scheme.
After a little bit of investigation I realized it's because of the HTML comments inside the plist file.
Although I think comments are not valid in plist files but people use them in the wild, so I fixed mine using this snippet.

file_content = sublime.load_resource(scheme_file)
removed_comments = re.sub(r"<!--.+-->", '', file_content)
plist_file = plistlib.readPlistFromBytes(bytes(removed_comments, 'UTF-8'))

Maybe you can do the same in ScopeHunter.

ScopeHunter: Theme parsing failed! Ignoring theme related info.

Look like ScopeHunter can't yet cope with the new *.sublime-theme format of ST3180+?

{
    "name": "ayu",
    "author": "Ike Ku",
    "variables":
    {
        "black": "hsl(0, 0%, 0%)",
    },
    "globals":
    {
        "foreground": "var(orange6)",
        "background": "var(black3)",
    },
    "rules":
    [
    ]
}

Show styling info from a syntax specific color scheme

I've enabled { "styling": true } in my settings to see the foreground and background colors in ScopeHunter popup window.
Here is my full user settings

{
  "show_popup": true,
  "show_panel": false,
  "styling": true,
  "show_simulated_alpha_colors": true,
  "selectors": true,
  "highlight_style": "outline",
  "extent_points": true
}

The bug is happening when you're looking a file (like a markdown file) that has syntax specific color scheme. The colors that are shown in styling section of scope hunter are from the default color scheme, not the current view's color scheme.

Not Loaded

Installing ScopeHunter via either Package Control or manually cloning the repo into the Packages folder, the ScopeHunter actions aren't loaded into the Command Palette. Typing "scope" results in three items, none of which are related to ScopeHunter.

Not working on ST3

Hello Isaac,

tried out the ST3 branch today on my ST3@OS X (build 3021). The commands get's added to the command palette, but they are not working. It just plainly does nothing, neither Toggle Instant Scoper nor Show Scope Under Cursor(s).

Below is the traceback output from the console (after restarting ST3):

Traceback (most recent call last):
  File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 156, in on_api_ready
    m.plugin_loaded()
  File "/Users/mick/Library/Application Support/Sublime Text 3/Installed Packages/ScopeHunter.sublime-package/scope_hunter.py", line 245, in plugin_loaded
    init_color_scheme()
  File "/Users/mick/Library/Application Support/Sublime Text 3/Installed Packages/ScopeHunter.sublime-package/scope_hunter.py", line 236, in init_color_scheme
    scheme_matcher = scheme_matcher = ColorSchemeMatcher(scheme_file)
  File "/Users/mick/Library/Application Support/Sublime Text 3/Installed Packages/ScopeHunter.sublime-package/lib/color_scheme_matcher.py", line 25, in __init__
    self.plist_file = readPlistFromBytes(sublime.load_binary_resource(sublime_format_path(self.color_scheme)))
  File "X/plistlib.py", line 104, in readPlistFromBytes
  File "X/plistlib.py", line 76, in readPlist
  File "X/plistlib.py", line 378, in parse
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 148, column 66

Hope that helps. If you need further information, I'll be happy to supply them.

Mick

PS: I installed the package through a custom repository in "Package Control" (via "Add Repository" and used the ST3 branch link)

Support for `sublime-color-scheme` format (JSON)

I'm playing with the new sublime-color-scheme format, but unfortunately scope hunter can not parse it at all.
I know it's experimental and you probably wanna wait a bit but I think this should be added some time in future

Add support for alpha()/a() hwb() and min-contrast()

  • Recently alpha()/a() was added to minihtml. We do not currently support this.
  • hwb() colors were also added. It is assumed that hwb with alpha is part of that. We need to support this as well.
  • min-contrast() was added as well. I'm not entirely sure how it operates, but I assume it operates like alpha(), but for contrast.
  • foreground_adjust support needs to be added. As I understand, rules that apply a background can have additional foreground adjusters to whatever color is returned for foreground. It is a way to adjust contrast, lightness, etc. for a any foreground associated with that background change.

Multi-Select Copy Link Issues

When doing multiple cursors, the individual copy links won't quite work right for simulated transparency colors as they conditionally show and can mess up the index.

Use a single ColorSchemeMatcher class

Currently the ColorSchemeMatcher class was designed to either return exactly the colors in the scheme OR return the colors simulating transparency. This was mainly because I never had a use case that required both.

Now that SH wants to use both, I am having to keep two ColorSchemeMatcher classes. Really, this should be done with just one that could return either. So, ColoirSchemeMatcher needs to be reworked a little to allow this. Also, while I am at it, I should probably track the selector scopes with the selector name so that I can handle issue #12. Instead of returning a bunch of single variables, I should probably return a named tuple, structure, or class. Since I use this library with a couple of plugins, this will probably require additional re-factoring of those plugins that use this. In the end it will be worth it and make the library more flexible.

Theme selector

There's a similar plugin 1 which prints out the selector that colours the current scope. Is this something you might consider adding to ScopeHunter?

Use color in popup

Since the popup supports foreground and background color customization, how about painting the color rgb hashes in their respective color (and adjusting text color to be readable)? Or alternatively adding a div behind it to just show the color.

The selector name from the color scheme is not shown anymore

I have "selector": true is my user settings and the default settings still has this description

    // Show the selector names and scopes
    // responsible for the color and styles
    "selectors": false,

But I don't get the matched selector name from the color scheme anymore. It's very helpful when there's a conflicting rule that overrides your rule and you want to find out which rule is causing it.
I hope you can bring it back soon.

Support Info

  • ST ver.: 3150
  • Platform: osx
  • Arch: x64
  • Plugin ver.: 2.8.0
  • Install via PC: True
  • mdpopups ver.: 2.1.1
  • markdown ver.: 2.6.9
  • pygments ver.: 2.1a0
  • jinja2 ver.: 2.8

Activate it only for one file

Hello,
thank you very much for this plugin, I use it very often to customize sublime themes.
I'm not sure if it is possible or not: can I activate the plugin only for a specific (current one) file?

USE CASE: I'm using the plugin to get the scope a specific file extensions, let's say a .sass file. I click around to toggle the popup or the console and copy the found scopes. Then I go over the .tmTheme file I want to customize using the found scopes. In here it is very annoying to have the scopeHunter activated, especially when finding a specific string. The popup or the console are always in the way. So is this possible?

Thanks

hide window when plugin is toggled off

when i call the plugin the first time it show up the console window which is good,
however when i try toggle off i have to use Esc to hide the console,

is there away to hide the console once the plugin it toggled off instead of using the Esc key each time ?

Weird scope expansion for highlighting

I don't understand this.

Note: in the first example ( is, imo, incorrectly underlined and in the second the entire call len (d2) is. It should just be len in both cases.

2015-02-18_14 24 17

2015-02-18_14 24 43

2015-02-18_14 24 48

Lagging Sublime Text Ctrl+Tab

This plugin is lagging. I am not sure why. I figured out was this plugin because I ran:

This list shows how much time each plugin has taken to respond to each event :

on_activated                     :
ScopeHunter.scope_hunter         : 27.869s total , mean : 0.069s , max : 0.791s
HexViewer.hex_viewer             : 0.031s total  , mean : 0.000s , max : 0.002s
ExtendedTabSwitcher.ExtendedSwitc: 0.006s total  , mean : 0.000s , max : 0.001s
Default.pane                     : 0.003s total  , mean : 0.000s , max : 0.001s
TextPastry.text_pastry_clipboard : 0.014s total  , mean : 0.000s , max : 0.002s
TabsExtra.tabs_extra             : 0.414s total  , mean : 0.001s , max : 0.030s
FileDiffs.file_diffs             : 0.027s total  , mean : 0.000s , max : 0.001s
HighlightWords.HighlightWords    : 0.003s total  , mean : 0.000s , max : 0.001s
SyncViewScroll.syncscroll        : 0.133s total  , mean : 0.000s , max : 0.044s
BracketHighlighter.bh_core       : 0.067s total  , mean : 0.000s , max : 0.006s
LaTeXTools.latextools_utils.input: 0.004s total  , mean : 0.000s , max : 0.001s
Origami.origami                  : 0.008s total  , mean : 0.000s , max : 0.001s
FuzzyFileNav.fuzzy_file_nav      : 0.002s total  , mean : 0.000s , max : 0.001s
ConvertToUTF8.ConvertToUTF8      : 0.006s total  , mean : 0.000s , max : 0.001s
TypeScript.typescript.listeners.l: 0.044s total  , mean : 0.000s , max : 0.002s
RememberCommandPaletteInput.fixed: 0.002s total  , mean : 0.000s , max : 0.001s
TextPastry.text_pastry_selection : 0.001s total  , mean : 0.000s , max : 0.000s
Terminus.terminus.view           : 0.016s total  , mean : 0.000s , max : 0.006s
HighlightWordsOnSelection.word_hi: 0.012s total  , mean : 0.000s , max : 0.001s
MaxPane.max_pane                 : 0.039s total  , mean : 0.000s , max : 0.002s
ClickableURLs.clickable_urls     : 0.247s total  , mean : 0.001s , max : 0.008s
SideBarEnhancements.SideBar      : 0.029s total  , mean : 0.000s , max : 0.001s
SyntaxManager.syntaxmgr          : 0.041s total  , mean : 0.000s , max : 0.018s

The problem seems line 752, because commenting it out immediately stop the lag while switching between tabs.

File: Data/Packages/ScopeHunter/scope_hunter.py
738:     def on_activated(self, view):
739:         """Check color scheme on activated and update if needed."""
740: 
741:         if sh_thread is None:
742:             return
743: 
744:         if not view.settings().get('is_widget', False):
745:             scheme = view.settings().get("color_scheme")
746:             if scheme is None:
747:                 pref_settings = sublime.load_settings('Preferences.sublime-settings')
748:                 scheme = pref_settings.get('color_scheme')
749: 
750:             if scheme_matcher is not None and scheme is not None:
751:                 if scheme != scheme_matcher.scheme_file:
752:                     reinit_plugin()
753: 

The tab switch lag is not constant. For example, switching from Tab 1 to Tab 2, lags for about 0.5 seconds. But, switching back from Tab 2 to Tab 1 has no lagging.

This does not happens for all tabs, just some random tabs.

Run the following command from the menu: Preferences->Package Settings->ScopeHunter- >Support Info. Post the result here.

- ST ver.: 3181
- Platform: windows
- Arch: x32
- Plugin ver.: 2.11.1
- Install via PC: False
- mdpopups ver.: 3.3.3
- markdown ver.: 2.6.11
- pygments ver.: 2.1a0
- jinja2 ver.: 2.8

Add support for .sublime-color-scheme

The necessary work for handling the new format is mostly done.

What needs to be completed is grabbing the correct file version, and applying overrides. Eventually, we will most likely rely on the sublime API style_for_scope, but that is not ready for prime time yet.

The current handling should handle things without issue once we nail the overrides, and possibly track if the file(s) are updated (something we don't currently do). We may or may not stick with our system of getting scope and colors, but plugins like ExportHtml, MdPopups will likely just need style_for_scope once it polished up.

Unable to find ScopeHunter in Package Control

I am unable to find ScopeHunter in Package Control within Sublime Text.

Other packages can be found normally, but ScopeHunter is no where to be found.

When I do Package Control: Install Package and search for

"Scope":
image

"ScopeHunter:"
image

Any ideas on why this is happening, or how I can fix this and install ScopeHunter?

Thanks!

python-markdown makes other package break.

I am using a package named OmniMarkupPreviewer which can preview markdown in real-time.
Recently, I found it not working because it occasionally used the python-markdown introduced by ScopeHunter.
Disabling ScopeHunter cannot resolve it but uninstalling ScopeHunter resolves.
I am not sure who should be responsible for this (maybe none) so I report both sides.

Ref: timonwong/OmniMarkupPreviewer#85

Highlight more than just one scope extend

Following up on #15 I got the idea to mirror the scope highlighting that http://tmtheme-editor.herokuapp.com/ does:

2015-02-22_22 57 53
(hovering the string)

Different colors could be chosen by a configurable list of scope names that includes the defaults like variable, constant etc. or could just inspect the active color schemes for all available colors and choose some that are different enough up the first or second neighbour, if you know what I mean. They can also repeat easily enough.

The only issue is that I'm not sure how the regions from add_regions are layered and if order of the API calls affects them, especially regarding underline mode.

Might want to suggest an API method to extract a certain scope (level) of a point based on a second parameter over at the issues repo which would be more efficient.

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.