Xcode Matching Pairs of Braces, Parentheses, and Brackets - xcode

If you are a notepad++ user you will understand what I want Xcode to do for me , it's very simple I want when i place the cursor before or after a Braces, Parentheses, and Brackets , it highlight for me its pair to know the matching ones juste try to place the cursor in notepad++ and tell me how to do that in Xcode i know already the trick of the right arrow of the keyboard and the double click but the trick of notepad++ is faster , thanks in advance

The only thing I can add (and I have looked a fair bit) is to train your eyes on the vertical grey bar on the left edge of the editor, called the "code folding ribbon" in preferences. It will visually hint at matching braces (not parenthesis) at all nested levels, and mousing over it hints quite strongly and gives the interface for folding.
See here for a snapshot and brief description from Apple.

Related

Code folding of round brackets in RStudio

Is there a way to add code folding arrows next to round brackets in RStudio? For example, in the picture below a can collapse using the little arrow next to it, but no arrow shows up to collapse b. Is it possible to make those round brackets collapse without having to select the region that needs to be collapsed?
I'm especially interested in collapsing sub-brackets, which is already possible with the braced (as shown in c and d).
I have found that I can fold anything by selecting it and typing ALT+L, however, that can be rather tedious when needing to fold in a document with many brackets. Therefore, I am looking for an option to make the () brackets collapsable like the {} brackets.

Brakets keyboard shortcut to move focus to treeview

This should have been relatively easy to fine out , turns out its not, so actually all i really want is a shortcut with which i can toggle between the text editor and the treeview on the left.
The brackets documentation really don't mention any such shortcut see here.
In Atom text editor for example there is a shortcut ctrl+0 which shifts focus to the tree view , i can't seem to find such a shortcut in brackets though. I love all the features of brackets, but i just seem to be short of this one last shortcut to make my work flow awesome !!
Thank you.
Alex-z.

Sublime Text 3 unable to find text that is plainly there

Hitting cmd+f to find text in SublimeText, I frequently see something like:
Clearly 'someText' exists on the page. Why can't Sublime find it?
Note this sometimes seems to work, and sometimes fails. I can't work out the difference though.
How can I reliably find text with Sublime Text?
I've tried to reproduce this problem with Sublime Text 2 and this is what I found:
If you place caret before the text and the hit find, the text will be found
If you place the caret after the text and then hit find, the text will not be found
It seems that Sublime Text doesn't wrap search by default. You can enable it by toggling the button with the arrow icon (second one from the left of Find what, its tooltip should say Wrap). Then the search works regardless of the caret position.
Look at the buttons right before search box. Sometimes they are just get disabled accidentally, mis-click, or the short-cut get trigged, then the search doesn't behave as expected.
From left to right, RegExp, case sensitive, whole word, wrap(search whole doc, not just below current line), you can see them with mouse pointer hover.
I strongly suggest you to disable those shortcuts to prevent unexpected toggle of these :)
Also, turning off the regex may help you in searching for symbols which have special meaning in regex. For instance, someText(foo) will not be searchable in regex mode without escaping the brackets or putting the search string in quotes.

xcode: select expressions shortcut

With Eclipse/Java one of the shortcuts I used a lot was selecting expressions. alt+shift+up would increase selection to the next parent/enclosing expression, alt+shift+down would bring it back down.
Is there anything like this for XCode/Objective-C. What about when using vi?
I don't know about any keyboard shortcuts, but in XCode double-clicking a parentheses, curly bracket, square bracket, or quote will select the corresponding expression/block.
Doesn't seem to be any way to do this, even in XC4. Sad.

Conventions for the behavior of double or triple "click to select text" features?

Almost any mature program that involves text implements "double click to select the word" and, in some cases, "triple click to select additional stuff like an entire line" as a feature. I find these features useful but they are often inconsistent between programs.
Example - some programs' double clicks do not select the ending space after a word, but most do. Some recognize the - character as the end of a word, others do not. SO likes to select the entire paragraph as I write this post when I triple click it, VS web developer 2005 has no triple click support, and ultra-edit 32 will select one line upon triple clicking. We could come up with innumerable inconsistencies about how double and triple click pattern matching is implemented across programs.
I am concerned about how to implement this behavior in my program if nobody else has achieved a convention about how the pattern matching should work.
My question is, does a convention (conventions? maybe an MS or Linux convention?) exist that dictates how these features are supposed to behave to the end user? What, if any, are they?
I don’t believe there is a standard to the level of specification you want, and there probably shouldn’t be. Apple Human Interface Guidelines are the most complete. With respect to selecting content (as opposed to controls or discrete data objects), they say:
Double-clicking is most commonly used as a shortcut for other actions, such as… to select a word. Triple-clicking selects the next logical unit, as defined by the application. In a word-processing document, triple-clicking in a word selects the paragraph containing the word…. Double-clicking within a word selects the word. The selection should provide “smart” behavior; if the user deletes the selected word, for example, the space after the word should also be deleted… In some contexts—in a programming language, for example—it may be appropriate to allow users to select both the left and right parentheses (or braces or brackets) in a pair, as well as all the characters between them, by double-clicking either one of them.” (p115-116)
Apple is quite specific about what characters are and aren’t included in a word.
Microsoft’s Windows User Interaction Experience Guidelines say:
For some types of selectable objects, each click expands the effect of the click. For example, single-clicking in a text box sets the input location, double-clicking selects a word, and triple-clicking selects a sentence or paragraph. (p430)
Java Swing Look and Feel Design Guidelines say:
Double-clicking (clicking a mouse button twice in rapid succession without moving the mouse) is used to select larger units (for example, to select a word in a text field)…. Triple-clicking (clicking a mouse button three times in rapid succession without moving the mouse) is used to select even larger units (for instance, to select an entire line in a text field)…. A triple click in a line of text deselects any existing selection and selects the line.
The Gnome Human Interface Guidelines don’t say much about what double- and triple-clicking should do.
This gives you the freedom to choose whatever is best for your users. Double and tripling clicking are expert shortcuts, so their behavior should aim to maximize efficiency. Consider why the user is selecting something and design to make that easiest and fastest.
For example, apparently the rationale behind including the trailing space when double-clicking a word is that users usually select a word in order to copy or paste it in another position in the text. This implies you automatically include the trailing space in order keep the user from having to manually delete a remaining extra space at the source and add a word-separating space at the destination.
Likewise if users are selecting a line of code or paragraph to copy or move it somewhere else, then you probably want to include the newline characters so the user isn’t left with an empty line at the source and force to manually add a newline at the destination (assuming they didn’t want to take the line/paragraph and combine it with another line/paragraph.
If selection is for something other than copying and moving text in sentences, then none of this may apply and you don’t necessarily want to include trailing spaces or newlines. That’s why there shouldn’t be a standard.
An alternative is to do what Apple calls Intelligent Cut and Paste (see the Human Interface Guidelines), or Microsoft Word’s Smart Cut and Paste, where spaces, newlines and other adjustment are algorithmically figured out when cutting, copying, pasting, and deleting, not when selecting.
In my perfect world I would have it work like this.
Double click on a word selects the word only (a word according to the grammar rules of the locale), no trailing space (this is for easier copying between programs so that I would not need to remove any spaces when pasting)
If I remove the selected word my text editor is aware of my content and removes any additional spaces left over
A triple click selects a line with no trailing newlines. (A paragraph is a long line that has been wrapped)
In Windows, Linux and OS X double-click selects the word under cursor triple-click selects the entire line of text (single line only, i.e., wrapped line)
Finding answers and come up with a alternative solution:
I like to write code or command in text, and copy them to shell prompt without the ending \n
1. use notepad
2. surround each line with ()
3. use ctrl + double click.
Fine...

Resources