Home Download Buy Blog Forum Support

Is there a human-friendly document that details selections?

Is there a human-friendly document that details selections?

Postby blipbloop on Sat Feb 27, 2010 11:57 pm

The documentation for selections at http://www.sublimetext.com/docs/selection is rather anemic and relying on trial and error is like trying to decipher ancient runes. :shock: What I'd like to see or help write for new users like myself is a readable document in plain English that shows us how to do all the cool selections strewn about in these forums.

For instance, how do we:
    - Select all code in a tag, function, etc
    - Select all instances of variables or identifiers in a document and have changes reflect in all instances
    - Select asymmetrical columns that don't have the same ending points
    - Search and select within a selection
And many more. It would be great if the document was organized such:
    1. Name and show the selection in action (if possible) in plain English
    2. Give a brief description of what it does
    3. List the keystrokes to make it happen
    4. List the keybindings for more advanced users who want to go in and toggle stuff
    5. If dependent on a plugin, point to a link of that plugin so we can easily grab it and get working
    6. Show cool uses of pairing different plugins or selections together like a combo attack in Street Fighter 2 :)

So far I've been depending on trial and error, piecemeal forum posts, plugins that lack clear, accessible instructions, and screencasts with no idea of what keystrokes are being pressed to achieve those effects I so badly want to use!

Any help is greatly appreciated and I absolutely wouldn't mind putting together a document if steered in the right direction.

Holler at your boy!
blipbloop
 
Posts: 6
Joined: Tue Feb 23, 2010 5:07 am

Re: Is there a human-friendly document that details selections?

Postby Anomareh on Sun Feb 28, 2010 2:46 am

I'll try to help the best I can.

2) You can easily do this with find all. Hit ctrl F, type your string (feel free to use regex etc), and hit find all. All matches are now selected and you can change them all at once by typing. At this point you could just do a find & replace just the same though. (forgot the keybind, I rebound it)

You can also use ctrl + d. Ctrl + d highlights whatever word the caret is currently in if it is. Further presses will continue to highlight the next place in the file that is identical to what's already selected. It will loop to the end and start back from the beginning and highlight more if for instance you started in the middle. You can also use ctrl + d with any other selection. So you can highlight a line of code and hit ctrl + d to quickly select any other instance that exact line is found.

There is also an option to specify what characters separate words that obviously effects this functionality. You can configure how you wish.

3) Ctrl + left click let you add new carets. You can select lines anything etc just as you normally would just hold ctrl and drag and highlight everything you want. Shift + right click will let you select columns. You can combine this with ctrl (so ctrl + shift + right click) as well to add multiple column selections and mix & match with normal selections.

4) In the find and find & replace panels there is a box to click that will search in selections. I think it is automatically on if you open the panel with a selection though I'm not 100% sure and it may act differently with the copy text to find panel option on. There may also be a key bind for it, some of the options have keybinds. If there isn't I'm sure you can probably bind it if you want.


That's all I can think of at the moment. Not sure about your first question. There are some other default keybinds for selections that I haven't really messed with, sure of their use, have had varying success using. There is also a plugin I believe somewhere that allows you to do multiple selections with just the keyboard. I think it's the power user plugin though I'm not sure.

Lastly, I think it was Subliminator, started writing a beginner's guide to Sublime that had a decent section on using selections (it also has a lot of other useful information). It's probably a few pages back in this forum.
Anomareh
 
Posts: 222
Joined: Thu Oct 01, 2009 7:32 pm

Re: Is there a human-friendly document that details selections?

Postby n00ge on Sun Feb 28, 2010 8:21 pm

http://twitter.com/n00ge
Sublime Text 3 dev builds | OS X 10.8.2 & Ubuntu 13.04
n00ge
 
Posts: 140
Joined: Mon Oct 05, 2009 1:23 am

Re: Is there a human-friendly document that details selections?

Postby blipbloop on Wed Mar 03, 2010 5:09 am

Anomareh: Thanks for your contribution but I'm looking for selections that are a bit more advanced! Since we're both new, maybe send me a PM as you find out new stuff that might be documented elsewhere and I'll do the same :)

n00ge: That's exactly what I was looking for. Thank you kindly! I'm sure I'll have more questions after reading it and messing around but the questions will be more specific!
blipbloop
 
Posts: 6
Joined: Tue Feb 23, 2010 5:07 am


Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot], Majestic-12 [Bot], sapphirehamster and 26 guests