FindSelected
A very simple Sublime Text 2 and 3 plugin for quickly searching for text
Details
Installs
- Total 4K
- Win 2K
- Mac 1K
- Linux 590
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Find Selected
A plugin for Sublime Text 2 and 3 that adds an additional pair of methods for quickly searching for text within a page.
Details
Two additional search methods are available:
find_selected_next - If some text is selected then it is searched for and the cursor highlights the next occurrence of the text. If no text is selected then depending on the passed argument we either search for the last Find search term (“last_search”) or the clipboard (“clipboard”).
find_selected_previous - As above but we search backwards
This package doesn't really add much in the way of new functionality, it just makes available existing functionality under one method or keypress. Previously to search for the last search term you would call the “find_next” method or to search for selected text you would call the “find_under” method. Now you can just call the “find_selected” method and depending on whether text is selected or not the appropriate built-in method is called for you. It's a somewhat trivial change in behaviour but one I found that I missed greatly when migrating from UltraEdit. There is also the added ability to search for whatever is on the clipboard in one keypress.
Important note about key bindings:
If you have SublimeCodeIntel installed it grabs CTRL+F3 by default. If you wish
to override this behaviour you will need to put Find Selected keys in your user
key bindings file. To do this open the default key bindings at Preferences
->
Package settings
-> Find Selected
-> Key Bindings - Default
. Copy and paste
these into your user file at Preferences
-> Key Bindings - User
ensuring you
add the trailing comma as appropriate.
Installation
The easiest way to install is through Package Control.
Once you install Package Control, restart ST3 and bring up the Command Palette (Ctrl+Shift+P on Linux/Windows, Cmd+Shift+P on OS X). Select “Package Control: Install Package”, wait while Package Control fetches the latest package list, then select FindSelected when the list appears. The advantage of using this method is that Package Control will automatically keep FindSelected up to date with the latest version.
Using GIT:
Go to the Packages directory (Preferences
/ Browse Packages…
). Then clone this
repository:
git clone git://github.com/CodeEffect/FindSelected
Manually:
Downoad a zip of the project (click on the zip icon further up the page) and extract
it into your packages directory (Preferences
/ Browse Packages…
).
Default key bindings
f3
- find_selected_next
- If selected find next occurrence, if not then find
last search term.
shift+f3
- find_selected_previous
- If selected find prev occurence, if not
then find previous last search term.
ctrl+f3
- find_selected_next
- If selected find next occurrence, if not then
find clipboard.
ctrl+shift+f3
- find_selected_previous
- If selected find prev occurrence,
if not then find previous clipboard.
License
Find selected is licensed under the MIT license.
Copyright © 2013 Steven Perfect steve@codeeffect.co.uk
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.