Closed AllanLRH closed 8 years ago
This works fine in ST3 without modification - you just need to install it manually instead of through Package Control. Just go to your Packages
folder and run
git clone https://github.com/kek/sublime-expand-selection-to-quotes.git "Expand Selection to Quotes"
and you're all set. It would be nice if Package Control was updated, though (hint hint)
@MattDMo Tried this, but doesn't seem to work! Any tips?
Are you sure you cloned it to the right folder…? Anyways, you should be able to install this plugin using Package Control, if you add the repository: In the Command Palette, search for Package Control: Add Repository, and add the repo URL (https://github.com/kek/sublime-expand-selection-to-quotes). Once it's done, install it as you would any other package.
Never knew this way of installing a repo. Just did that. It is there in the Pacakges folder, I am using Mac. But it is not working nor showing up anywhere. Though it is present in the list of pacakges. Any help?
OK, it is working now, great! But it is also selecting the quotes, how can I make it not select the quotes, but only the content inside em. @AllanLRH Also it turns double quotes into single quotes :(
It works this way for me (a |
is a cursor, characters in [ ]
are the selection):
"abcd|ef"
Activate the plugin
"[abcdef]"
Activate the plugin
["abcdef"]
@AllanLRH
Here is the situation with me, this is me pressing CTRL + '
several times and what it does is that it selectes the quotes and changes them. There are no settings anywhere to be configured. I really like this pacakge and could use your help.
@ahmadawais You must have some other plugin installed as well. If you know Python, look through the source of this repo - you'll see that there's no functionality to replace double quotes with single, or vice versa. To find out what you're triggering with Ctrl', open the Console (Ctrl`) and enter
sublime.log_commands(True)
Then, put your cursor between some quotes and hit Ctrl'. The Console should show
command: expand_selection_to_quotes
If it doesn't, another plugin has hijacked the key binding. To determine which one, install FindKeyConflicts
and run the FindKeyConflicts: All Key Maps to Buffer
command in the Command Palette. Look through it for Ctrl+'
and you should be able to find the offending plugin. You can then edit its .sublime-keymap
file to change or delete the key binding.
So I just looked through Package Control, and it looks like ToggleQuotes
may be the offending plugin. If you don't need it, you can just remove it with Package Control: Remove Package
.
Great! Thanks! Removed the package and it is working fine now :)
I've submitted a PR to update Package Control to indicate that this works with ST3 too. Sorry about the delay :)
@kek Thanks for that! I actually had too a couple days ago, as I kind of figured the package had been abandoned. My PR has been closed in favor of yours, though.
Oh, I didn't notice. Yeah, it was pretty abandoned. I actually don't use Sublime Text daily. Thanks for helping out.
The git commit message hints of ST3 support – if this is so, it would be really nice with Package Control support for ST3 as well as ST2 :)