Settings now open in a new window, with the default and user settings side-by-side. Likewise for key bindings.
Another highlight is the on_hover API, which is used by the new show_definition functionality. The basics of on_hover are:
class Example(sublime_plugin.EventListener): def on_hover(self, view, point, hover_zone): pass
hover_zone will be one of sublime.HOVER_TEXT, sublime.HOVER_GUTTER or sublime.HOVER_MARGIN.
Along with on_hover are a couple of new flags for show_popup: HIDE_ON_MOUSE_MOVE and HIDE_ON_MOUSE_MOVE_AWAY. The latter flag will hide the popup if the mouse moves away from the popup, but won’t hide the popup if the mouse moves towards it.
If I have a maximized window, and I click on Preferences -> Settings or Preferences -> Key Bindings, I would like it if the new window opened was also maximized. I see that File -> New Window and opening a project also open a non-maximized window, so I guess this is a feature request maybe make it configurable?
(previously I almost never worked with more than one window, so didn’t notice it so much…)
When I open keybindings / settings - the default view is empty - it is ok? In older builds, the default file has list of default settings / keybindings - now is empty…
Using build 3116, unsaved file contents is corrupted, also file paths, if they contain umlauts etc.
Every time I open sublime, characters get more and more corrupt.
@gwenzek if you are not using any special XML characters in your CSS, there is no need to enclose it in CDATA. I think you should log an issue on the PackageDev repo for it though.
Keybindings supports few naming patterns: Default.sublime-keymap and Default (Platform).sublime-keymap. I’m using the first variant on custom keymaps and the configuration window show me a beautiful blank document. Probably an idea would be to either ask which one to show or show all of them.
It would be nice to implement an autoscroll for configuration keys, so if i select… let’s say scroll_speed on one side, jump the other side to the same key. That’s because the documentation is in only one place
Btw, show_definition is implemented by default? Or is just an API thingy?
looks like it is due to the code in symbol.py in the Default package - starting at line 166 - treating HTML differently, and thus not noticing it is a PHP file, so it is broken for all syntaxes that are embedded in HTML:
# Limit where we show the hover popup
if view.score_selector(point, 'text.html'):
class_ = view.score_selector(point, 'meta.attribute-with-value.class')
id_ = view.score_selector(point, 'meta.attribute-with-value.id')
if not class_ and not id_:
return
else:
if not view.score_selector(point, 'source'):
return
if view.score_selector(point, 'comment'):
return
# Only show definitions in a string if there is interpolated source
if view.score_selector(point, 'string') and not view.score_selector(point, 'string source'):
return