What is the best practice to Jump out of closing bracket in Resharper? - visual-studio

Its good when resharper inserts closing bracket automatically.
But assume condition that the method didn't have any parameter
in this situation it takes more time to jump out of the brackets is there a work around ?
now I use mouse to jump out from closing bracket.

Assuming you haven't typed anywhere else, you should also be able to just type the closing brace and ReSharper should automagically skip over it as though it hadn't added it in the first place. (same thing works with closing quotes and semicolons, btw)

You can turn this off by going to Resharper options/Editor and unchecking "Auto-insert pair brackets, parentheses, and quotes". I personally just use the right arrow key.

Related

Jump to matching brace in Xcode

In Xcode, if the cursor is on one brace (or bracket or parenthesis) of a matched pair, what keyboard shortcut will jump to the matching brace? Or how can I create such a shortcut?
An example of the feature I'm after is the "goto brace" shortcut in Visual Studio.
There is a Balance Delimiters menu command. So simply assign it any keyboard shortcut you prefer (all commands have customizable key bindings). You can also double-click the first delimiter to perform the same action.
A partial solution is to use code folding. For example, to jump from the opening brace to the closing brace:
Put the cursor just after the opening brace.
Fold with ⌥⌘←.
Arrow the cursor right to just before the closing brace.
Unfold with ⌥⌘←.
Since Xcode now has Vim mode you can use that and just hit %.
(Adding this answer for completeness - I understand it kind of amounts to "just use Vim".)

visual studio fast typing string inside brackets

In Visual Studio
while i am typing a string inside braces
what is the hotkey to go to ending bracket ] without pressing end
item["i am typing here..."] //i want an hotkey to jump here
if it's not possible
how can i jump out of current box which i am typing in?
namespace{
class{
method(){
lambda->({(jump out of this box)});
}
}
}
according to this https://www.dofactory.com/reference/visual-studio-shortcuts you should use end button to go to ending bracket and you can see all of hotkeys in this link.
You are looking for Ctrl-]. From the documentation:
Moves the cursor to the matching brace in the document. If the cursor is on an opening brace, this will move to the corresponding closing
brace and vice versa
At the bottom line - it will bring you to the end of your current braces-scope (or to the beginning of it if you are on the closing brace )
I did this trick after starting to type inside quotes ("")
press tab then press ]
It's much better than pressing end
Sometimes this won't work and will print /t character
I don't know how to deal with that
Still, there should be a better answer to this!

how to enable matching braces option in VS2010

now i am using vs2010 trail version.
i want to see the matching braces if there are multiple braces. the opening brace and the closing brace must be highlight.. how to achieve this?
Thank you,
Mihir
The link above should give you all default key mappings.
Another useful link is: Pre-defined keyboard shortcuts
I'd just like to mention a couple that I find very useful:
To jump back and forth between matching braces, you can put your cursor on either brace, and then push Ctrl-]
And also Ctrl-M Ctrl-L toggles all outlining in the current file, and Ctrl-M Ctrl-M toggles the current region
from msdn: http://msdn.microsoft.com/en-us/library/be94e8aw%28v=vs.80%29.aspx
outlines all the options and how to set them up
for javascript: Brace highlighting in Visual Studio for Javascript?

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.

Automatically insert closing bracket in Xcode

is there a way to have Xcode append a closing bracket ")" when I type the opening one "("? I know that it does this for those {}. I really miss Textmate :( A generic way to define which chars should be automatically inserted when the opening ones are entered would be kickass.
In Xcode 3.1 go to Preferences->Indentation
Check Syntax-ware indenting to on
and check Automatically insert closing "}"
and choose the characters you want to be inserted when the opening one is.
Also why not use Textmate nothing stops you and Xcode will notice if a file is edited externally
Have a look under Edit->Insert Text Macro->Objective C->Bracket Expression. This will insert a matched pair of brackets (or if you have something highlighted, put brackets around it). You could bind this to [ as a keyboard shortcut.
You can follow the instructions here to create one for parentheses. I tried but couldn't make it work.
http://cocoawithlove.com/2008/06/hidden-xcode-build-debug-and-template.html#textmacros
Personally, I drag the classes folder over to Textmate and edit there. I switch back to Xcode when I need to type in some long method name, or to build. I've been building a library of snippets for some of the common things I do in Textmate to make life easier there.

Resources