How do I jump to matching brace in VS 2019? - keyboard-shortcuts

As best as I can tell, Visual Studio 2019 completely removed the ability to jump to matching brace.
I tried the hotkey I've been using for years (Ctrl-]) and it changes indent instead (why would I need that? This is C#, not Python). I also tried looking up the KeyMap (Environment->Keyboard) setting and searching for match, and there was nothing relevant. As far as I can tell, Microsoft has completely removed this feature, but I wanted to confirm that Fattie and I are not the only ones with this problem.
(for reference, here is the question for VS 2008 whose answer no longer works because the default keyboard shortcut has changed.)
EDIT: The setting still exists, but has been renamed to not contain the all-important keyword "match". See accepted answer.

The control is still there.
Go to Tools -> Options -> Environment -> Keyboard and lookup Edit.GotoBrace to see the current key combination for this feature:
You can set the key combination from the pictured menu.

just for the ones among us with non-us keyboard. On my keyboard, I need to press 'AltGr' to access "]". Therefore Ctrl+] doesn't work. Interestingly, VS has already compensated for that problem and changed the hotkey to Ctrl+`, which works nicely for me. You just need to know the hotkey has changed (depending on your keyboard).
Hope this saved a few minutes of your time ;)
Regards,
Eleusius.

On a Finnish/Swedish keyboard the Edit.GotoBrace field is mapped to Ctrl+Å

Related

How to keep IntelliSense Complete Word option off?

IntelliSense has a mode where if you hit the spacebar, it will automatically type out the suggested auto-complete word. In order to prevent this from happening, you can hit the Escape key before pressing Space. This will close the autocomplete popup, so that the suggested word is not automatically typed.
I prefer the alternative setting, where I actually have to hit the Enter key to accept the suggested autocompletion. If I just type Space, I want a space to follow the characters that I actually typed.
I know that I can toggle between the undesired mode and the second mode I describe, which I do want. To do this, I click Edit -> IntelliSence -> Toggle Completion Mode.
My problem is that this setting never sticks. It constantly reverts to the wrong mode. I'm not sure exactly when it's changing, but it seems to revert back several times a day. If I change this for one Solution, it won't apply to my other Solutions. Even if I apply it to a solution, close VS, reopen, and start working again, it will have reverted.
Does this happen to everyone else, or is this unique to me? Is there some global setting that forces this feature to stay off always? Do I have a corrupted file somewhere that's causing this?
No, this is normal behavior and this setting behaves like what you described in the previous VS versions.
However, thanks to those members who is reporting this issue and Microsoft has fixed this behavior in the latest VS2019 version.
Since VS2015 is not supported by Microsoft so far, so this behavior cannot be fixed on VS2015 and I suggest you could install the latest VS2019 Community and get what you want.
Once you click the Toggle Completion Mode under Edit-->Intellisense, no matter you close VS, create a new project or a solution, use other c# file editor, it will never revert back.

Atom keyboard shortcut to change window focus not working

I have the following keymap.cson file to config my Atom editor:
'body':
'ctrl-shift-cmd-left': 'window:focus-pane-on-left'
Only when I run this command, the current text is selected. Which without the alt key held, would make sense as a highlighting command.
However, is I bind a key command which I think most likely doesn't have a competing action, say alt-cmd-;, it seems to be registered into the list of key commands in Settings/Keybindings, yet again no window focus is happening.
Edit:
I now realize that pane and not window may be the relevant term for what I want. Still, searching the Key Bindings for pane focus switching didn't yield anything obvious. Surely, there must be a simple way to select through files in the Project area while editing.
Although this answer doesn't match the title of the question, based on your edit I think that tree-view:toggle-focus is what you're looking for.
Please try using Ctrl + 0.
And, if you use Nuclide (related to React), please try disabling it to check the difference.

Ignore whitespace changes in IntelliJ changebars

I have a file from our repository where I ran auto-indent (because it was a mess), and now the whole file is marked by blue changebars (down the right hand side of the editor window), making it difficult to find my changes.
I am already ignoring whitespace changes in the diff window (as described here: Intellij and changes tab), is there a way to also do this in the editor window?
I couldn't find a way to completely ignore whitespaces, but IntelliJ (I'm using version 2016) lets you set an option to color whitespace-only changes differentely:
Editor -> General -> Different color for lines with whitespace-only modifications
which helps tremendously.
At the moment [idea 13.5] it seems that is not possible to ignore spaces in the standard editor. You can open a support ticket
We also faced this in the company due the different codestyles used, at the end we settle for:
setting a common codestyle that everyone editing the code should [actually must] follow
reformat the whole codebase to the given codestyle
recommit the formatted code [without any addition or deletion, just the reformat]
It took just a bit of time, but at the end now we are working far better. In this way from that moment onward, we would have all the time the code that would aesthetically the same trough next versions.
You can completely disable the highlight of whitespace modified lines in :
Settings -> Editor -> Color Scheme -> VSC -> Editor Gutter -> Whitespace-modified lines
And then uncheck the background color :
Essentially, you want Intellij to use the --ignore-all-space or --ignore-space-change upon a merge.
My developer team also deals with this challenge because we have different code formatting preferences. The result is every merge is painful for no reason. The team loves being able to have their code formatting, but this negates it.
As of now there is no solution. Intellij has the technology to ignore whitespace, so fixing this is really just adding a check box on the merge diff screen or even in the version control settings.
There is a feature requests IDEA-107714
Please up vote it!
https://youtrack.jetbrains.com/issue/IDEA-107714
Try this,
View --> Active Editor --> Show whitespaces
this is guaranteed to solve your problem

Coderush Intellassist vs Intellisense

I'm using coderush with vs 2008. coding in VB.net.
I don't see any evidence of Intellassist, all i see is the usual VS intellisense.
Is this normal? Preferred? Do most people leave the defaults or do most/some turn off vs's intellisense?
Does intellassist somehow agument intellisence?
thanks
jonathan
I see CodeRush Intellassist as an extension of Visual Studio Intellisense and not its replacement or anything else. Intellassist completes the text at the editor caret position with an in-scope identifier and may include other suggestions, such as physical file path completion or enumeration elements completion (which is not actual for Visual Basic).
To use Intellassist, just write code as you normally would. When Intellassist senses one or more suggestions matching the code you've entered so far, the best suggestion will be displayed to the right of the editor caret.
Once Intellassist is active, you have several options:
Press Enter to accept the highlighted suggestion. If you have the case-sensitive option turned off, Intellassist will ensure the entire suggestion is properly cased to match the declaration.
Press Shift+Enter to accept a portion of the suggestion. Shift+Enter accepts from the caret to the character preceding the next uppercase letter in the suggestion. For example, if "AllowMultipleSelections" was the suggestion, and "al" had been typed in, pressing Shift+Enter successive times would cause the selection to shift as follows:
Shift+Enter is useful when you need to create a new variable name that is similar to a portion of an existing suggestion, or when you want to quickly access a different but similarly-named suggestion (differing only in the latter portions of the text). You can press Shift+Enter to move the selection right, and then start typing to get other suggestions.
If more than one entry is suggested you can cycle forward and backward through the suggestions by pressing the Tab and Shift+Tab.
Press the Delete key to cancel the suggestion.
Do nothing for a few moments and Intellassist will hide the suggestion.
If the text you've entered is a code template that you want to expand, just press Space or ; to expand the template normally.
Continue typing (narrowing down the suggestion list or ultimately ignoring all suggestions).
Intellassist is highly configurable. You can specify whether case-insensitive suggestions should be made, and also change a host of other options.

Keyboard shortcut to Un/Comment out code in Mathematica 7?

A keyboard shortcut to comment/uncomment out a piece of code is common in other programming IDE's for languages like Java, .Net. I find it a very useful technique when experimenting through trial and error to temporarily comment out and uncomment lines, words and parts of the code to find out what is and isn't working.
I cannot find any such keyboard shortcut on the Mathematica front end in version 7. I know that it is possible to comment out code by selecting the code, right mouse click and select Un/Comment from the menu that appears but this is too slow while coding.
I tried to access this using the menu key Menu on the keyboard but Mathematica frontend doesn't respond to or recognise this key unlike other applications, this could have allowed a key combination for commenting. Can someone else verify that this isn't unique to my machine and that the key isn't recognised by mathematica. I looked at this question and looked in the KeyEventTranslations.tr file but I don't think there is any way to create a shortcut to do this(?). Should I just live with it?
Any other suggestions?
(I have seen there is an Emacs version of mathematica, I have never tried Emacs or this Mma version and imagine that it would have this ability but would prefer not to go to the trouble and uncertainty of installing it. Also I would guess that the Wolfram Workbench could do this, but that may not be worth the investment just for this.)
You can install the shortcut in Mathematica 7.0.x if you are willing to edit the Mathematica system file MenuSetup.tr. You can find it in the same location as the KeyEventTranslations.tr file (i.e. in the installation under "SystemFiles/FrontEnd/TextResources/platform"). In MenuSetup.tr, locate the following line under the definition of the Edit menu:
MenuItem["Check &Balance", "Balance", MenuKey["B", Modifiers->{"Control", "Shift"}]],
Immediately below that line, insert the following:
MenuItem["Un/C&omment Selection", KernelExecute[FE`toggleComment[]], MenuKey["/", Modifiers->{"Command"}], MenuEvaluator -> Automatic, Method -> "Queued"],
The Un/Comment Selection command is now available under the Edit menu, with the keyboard shortcut Cmd-/ or Alt-/ depending on your platform -- just like in Mathematica 8 where this command comes pre-installed.
Please take as read the usual disclaimers about hacking the Mathematica installation files -- no warranty is offered :)
I do not know of any way to map this function to some shortcut involving the Menu key.
Shortcut Key, No Menu
The preceding steps mimic what Mathematica 8 does by installing a new menu item. If you prefer to leave the menus unchanged, then you can install the shortcut in KeyEventTranslations.tr instead. Add the following line:
Item[KeyEvent["/", Modifiers->{Command}], KernelExecute[ToExpression["FE`toggleComment[]"]], MenuEvaluator -> Automatic, Method -> "Queued"]
You'll need a comma on the end of that line if it is not the last item in the list.
Select the code and press one of the following:
Alt+/
Alt-E-O
Alt+E+O
Notes:
Tested only on Windows, using Mathematica 8.
On my non-US keyboard (ABNT Brazil), the shortcut Alt+/ doesn't work, instead I use Alt+E+O.
Here is code for your KeyEventTranslations.tr file that will comment out code. I am still working on the other half.
Item[KeyEvent["/", Modifiers -> {Command}],
FrontEndExecute[{
NotebookApply[FrontEnd`InputNotebook[],
"(*\[SelectionPlaceholder]*)"
]
}]
],
This binds it to Alt+/ as it is in Mathematica 8.