Sublime Forum

Select and replace

#1

In general discussion board no one know the answers so far.
Could tech support look at this?

I have following line of code:
subprocess.Popen(“uptime”)

and when select word uptime or uptime with quotes and then type “” I get quotes on both ends of this literal. Like this: ““uptime””.
In other words instead of replacing of what was selected and with what I type Sublime Text adds quotes around the selection.
Is there a way to tune parameters and switch off this smartness?

Leonid

0 Likes

#2

Hi,

It’s not a consequence of how select/replace works, it a consequence of a kind of auto‑completion. You get the same when you type an opening parenthesis, the closing parenthesis is inserted automatically (most of time, not always), and the same with square brackets and curly brackets.

For your case, when you select something to replace it with a quote, you have to first press DEL, to delete the selection, then only type the quote.

Alternatively, you may disable this completion feature entirely if it really annoys you. Add this in your user‑preferences file:

"auto_match_enabled": false,

For this, go to “Preferences” -> “Settings — User”.

0 Likes