spadgos/sublime-ToggleQuotes — Issue #1: Autoexapnd Selection?
Author: njlg
Created: 2012-01-12 00:12:19+00:00
State: open

I liked your ST2 package. However, I made a small modification so that if nothing is selected, the selection will be expanded to the nearest scope. That way I can just put the mouse on a quoted string and hit `Ctrl+'`

```python
class ToggleQuotesCommand(sublime_plugin.TextCommand):
def run(self, edit):
v = self.view

# nothing is selected
if v.sel()[0].size() < 1:
v.run_command("expand_selection", {"to": "scope"})

# something is selected
for sel in v.sel():
...
```

What do you think? Worth including?