Selector
Some extra context menu (right-click) options for selected text.
Details
Installs
- Total 201
- Win 135
- Mac 48
- Linux 18
Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Selector - Sublime Text 2 plugin providing extra text selection options.
Features
Google: search the selected text on Google (opens in default browser)
Stack Overflow: search the selected text on SO (opens in default browser)
URL Encode: URL Encode the selected text (also known as percent encoding)
URL Decode: URL Decode the selected string
Slugify: slugify the selected text
Wrap: wrap selected text in whatever tags with a couple of clicks, you can add tags yourself in the settings (decribed below)
Alphanumeric: Strip non alphanumeric characters from the selected text
Title: Convert selected text to title case
Class: Convert selected text to a class name (strip non alphanumerics and convert to camelcase)
Installation
Install 'Selector' via package control or download this repo and save it to your Packages directory.
Adding your own wrapper tags
Create a file in your Packages directory named Context.sublime-menu the content of the file should be in the structure below:
[
{
"id": "Wrapper",
"children":
[
{
"caption": "%%",
"command": "selector",
"args": {
"command": "wrap",
"open_tag": "%",
"close_tag": "%"
}
}
]
}
]
Above is the example for the percent wrap function. The caption option is what you would like this to display as in the right-click menu, open_tag and close_tag are what they sound like. Everything else should remain the same.
To add multiple it would look like this:
[
{
"id": "Wrapper",
"children":
[
{
"caption": "%%",
"command": "selector",
"args": {
"command": "wrap",
"open_tag": "%",
"close_tag": "%"
}
},
{
"caption": "Foo tags",
"command": "selector",
"args": {
"command": "wrap",
"open_tag": "<foo>",
"close_tag": "</foo>"
}
}
]
}
]
and so on.
Contribution
Any contribution is welcome. If you are adding commands, make sure they are covered by tests.
Make sure to write your code as if it is going to be read by humans. Pretty much every programmer I have met so far has been human, so it is a pretty good rule of thumb.