8 votes
 
ST2's autocomplete is very useful, but when suggestions pop up in the wrong context, they can be very annoying. I will never use autocomplete when I am typing a string in my code, and it's distracting when they pop up in those cases -- especially when I'm writing a docstring in Python. Please disable this behavior.
 
+4
Spencer Alger

Anyone else who thinks this would be useful can just edit the sublime setting "auto_complete_selector" to look something like this:


    "auto_complete_selector": "source - (comment, string.quoted)"


From the sublime console I used the following command to get the scope name of the current selection:


    sublime.windows()[0].active_view().scope_name(sublime.windows()[0].active_view().sel()[0].begin())


And this to test my selectors against different selections:


    sublime.active_window().active_view().score_selector(

        sublime.active_window().active_view().sel()[0].begin(), "source - (comment, string.quoted)"

    )

Translation provided by Microsoft translator:

Community stats

  • 27,553People
  • 3,825Feedback
  • 5,695Comments
  • 64,470Votes