Hi all,
I’ve recently discovered Sublime and as a long-time TextMate user I must say I’m really enjoying it!
I’ve been working on making my transition nice and smooth and have written a small plugin to switch the type of quotes (single vs. double).
It should work for most needs, it only relies on the scope starting string.quoted (double or single are assumed). I think I’ve quashed any bugs, the only thing I would like to change is where the cursor moves to, assume you are here in the string ‘testestest|’ and run the command, the cursor will end up here “testestest”|. I’m not even sure if I can move the cursor, or if it’s a major issue, but there you go!
You can grab the code here:
http://dom111.co.uk/files/sublime/plugins/toggle_quotes.py
Apologies if this is of no use, or already implemented somewhere and I just haven’t found it, in either case, please let me know!
Dom
EDIT: Updated the script as per advice from adzenith.