Closed FichteFoll closed 6 years ago
I am currently using this in an un-released package of mine and would love to see this available as a Package Control Dependency.
I don't have any requests for features.
How about adding a logging class on top of Python's logging module that writes to an output panel without showing the panel? That way, the view can be opened at will, to see the log output.
When can I expect this to land, even if it's without the above requested feature(s)?
That sounds like a great idea. However, I believe that is better suited to be a part of @scholer's Logging Control package.
Unfortunately I can not give an ETA at this time.
Abstraction for sublime's various flag arguments. (As mentioned in #102.)
For instance, the following code:
style_flags = 0
for style in styles:
if style in [
'DRAW_EMPTY', 'HIDE_ON_MINIMAP', 'DRAW_EMPTY_AS_OVERWRITE', 'DRAW_NO_FILL',
'DRAW_NO_OUTLINE', 'DRAW_SOLID_UNDERLINE', 'DRAW_STIPPLED_UNDERLINE',
'DRAW_SQUIGGLY_UNDERLINE', 'HIDDEN', 'PERSISTENT'
]:
style_flags |= getattr(sublime, style)
self.view.add_regions(
key='captures',
regions=list(self.get_regex_regions()),
scope=scope,
flags=style_flags,
)
...could be replaced by:
self.view.add_regions(
key='captures',
regions=list(self.get_regex_regions()),
scope=scope,
flags=sublime_lib.StyleFlags(styles),
)
The implementation could be based on IntFlag. Thus:
if view.classify(point) in sublime_lib.ClassFlags('WORD_START', 'WORD_END'):
pass
view.add_regions(
key = 'key',
flags = sublime_lib.ClassFlags.PERSISTENT | userflags,
)
def on_hover(point, hover_zone):
print(sublime_lib.HoverZoneFlags(hover_zone))
# "HoverZoneFlags.HOVER_TEXT"
Unfortunately the IntFlag
class hasn't been backported to the enum34
PyPI package (yet). Otherwise this is a great idea and certainly something I have in mind for these flags, since they are not as well organized as first-class members of the sublime
module.
Defered to a dedicated repo at the SublimeText org: https://github.com/SublimeText/sublime_lib
See the issue list for feature and implementation suggestions.
If you have any functionality requests that should be included in sublime_lib once it gets released as a Package Control dependency, tell us about it in this issue.
We will consider your requests and then decide whether we will add them to the module.
Features likely to be included:
ST2- and ST3-compatible abstraction that allows making arbitrary edits to views from within WindowsCommandsST2 is deprecatedsublime
module