Sublime Forum

How to change default quotes to single quotes?

#1

I am new to ST2 – switching from TextMate – and it’s a pretty cool editor. A big change is how I have to change settings. Currently it seems there a over 1.000 files for that :smile:

But I think I will walk through this the next days. One thing I couldn’t figure out: Where can I change double quotes to single quotes?

For example: typing “ech” and hitting enter results in echo “”; but I prefer echo ‘’; (with single quotes)

0 Likes

#2

There is a package called ChangeQuotes. Look for it if you have the package manager installed. If you don’t, install it! :smiley:

It’s also on GitHub.

0 Likes

#3

there’s also BracketHighlighter which does that and much more.

0 Likes

#4

Thanks. I have both plugins installed already. But as I understand ChangeQuotes (and BracketHighlighter), I have to do it manually – i.e. more work for me :smile:
I thought I can change (or overwrite) the file where the default of double quotes is saved. Is this saved in a JSON file as well?

0 Likes

#5

I misunderstood what you were wanting. It sounds like you’re wanting to edit the snippet file for echo, among others. If this is for PHP, then you would go to Preferences -> Browse Packages. Find the PHP directory and look for the echo-__.sublime-snippet file. Open that up, make your changes and save it.

0 Likes

#6

Cool. Works perfectly :smile:

I tried to add a ; in css_completions.py the same way so I ST puts a ; at the end of ech auto-completion. But that doesn’t work as expected.
Do you know where to alter this kind of behavior?

0 Likes