Ваші коментарі
There is a serious problem for keybindings and the way they are implemented because they disregard the keyboard layout. This applies to Windows as well and means that I have to remap all the keybindings that are not accessable via my keyboard or I just don't know which key is actually represented with my layout (e.g. the console binding ctrl+` maps to ctrl+ö).
I consider this a serious issue but it might take a while until something in this direction will be done.
That's what the plugin API is for. SublimeCodeIntel already does this for a few languages.
Scope selectors work like so:
<scope>source.python, text.plain</scope>See: https://manual.macromates.com/en/scope_selectors#scope_selectors
<description>$var['']['']</description>
<tabTrigger>var2</tabTrigger>
<scope>text.plain</scope>
<content>
<![CDATA[\$${1:var}['${1/^./\u$0/}']['${2}']]]>
</content>
</snippet>
See:
http://docs.sublimetext.info/en/latest/extensibility/snippets.html#substitutions
http://www.boost.org/doc/libs/1_44_0/libs/regex/doc/html/boost_regex/format/perl_format.html
Well, for the time being you can use this workaround with sublime.set_timeout:
import sublime
import sublime_plugin
class EventDump(sublime_plugin.EventListener):
def on_new(self, view):
self.view = view
sublime.set_timeout(self.on_post_new, 200)
def on_post_new(self):
view = self.view
w = view.window() or sublime.active_window()
print view.window().__class__, w.__class__
grp = w.active_group()
print w.get_view_index(view)
print grp.__class__, w.views_in_group(grp)
w.set_view_index(view, grp, len(w.views_in_group(grp)) - 1)
Still the same link, I edited it.
Try this one.
I can also have 416+ lines of "function (type variable, othertype var2)" in a buffer, they are highlighted correctly.
Also highlights invalid characters as "invalid.illegal".
Well, back to your syntax definition. The part you mentioned seems to be
<key>params</key> <dict> <key>begin</key> <string>\b</string> <key>end</key> <string>\)</string> <key>endCaptures</key> <dict> <key>1</key> <dict> <key>name</key> <string>variable.parameter.papyrus</string> </dict> </dict> <key>patterns</key> <array> <dict> <key>include</key> <string>$self</string> </dict> </array> </dict>
However, when you look at it it does not seem to do what you intend it to (what would you want to achieve by self-including this pattern?).
Furthermore, it uses an anchor only ("\b"), which is what I mentioned in my first comment.
And the "endCaptures": 1 will never be defined because your "end" regexp does not define any matching group.
Seems like your file got corrupted your something, this makes absolutely no sense.
Usually a self-include should not result in an infinite loop. It is likely that your regex you are using does not consume any character at all (it matches, but it does not match any character). Thus it would be called again and again without moving forward in the file. An example regex would be ".*?". A self-inclusion of this pattern would result in an infinite loop.
Служба підтримки клієнтів працює на UserEcho