Sublime Forum

Few questions after switching from ST2 to ST3

#1

I finally made the full switch from Sublime Text 2 to Sublime Text 3 and I have a few questions:

  1. How can I update the autocomplete pattern so it searches within strings and gets triggered within strings?
    I tried many different patterns in auto_complete_selector but none of them seem to work. Current value is set to source, text and it still doesn’t get triggered within strings.

  2. How can I prevent ST from closing the window when closing the project?
    The value of hot_exit does not affect this.

  3. When typing curly brackets {} and pressing enter, ST will automatically add a new line, indent and move the second curly brace one row down. This is great.
    How can I do the same for other types of brackets and parentheses? I mean specifically () and [].

  4. HTML tags are not closed within quoted strings, even though auto_close_tags is set to true.

Thank you!

0 Likes

#2

How can I prevent ST from closing the window when closing the project?

Maybe:

"close_windows_when_empty": false,

Needs to be placed into Preferences (OSX).sublime-settings if you are on a Mac.

How can I do the same for other types of brackets and parentheses? I mean specifically () and [].

This is an “hardcoded” function for curlies only. It is located in /Default.sublime-packages/block.py.

HTML tags are not closed within quoted strings, even though auto_close_tags is set to true.

Quoted strings represent literal text, no code. So most of the normal source code logic is disabled then.

0 Likes

#3
0 Likes

#4

Thanks for responses @deathaxe and @kingkeith!

@deathaxe

"close_windows_when_empty": false,

This value is already set to false.

HTML tags are not closed within quoted strings, even though auto_close_tags is set to true.

This works in SublimeText 2 and it’s a very useful feature. There are lots of cases when function names, class names and other parts of code are written within a string. I’ll continue to look for a solution.

@kingkeith this worked perfectly!

0 Likes