Ok, I found nothing about this and I have no idea how that happened. When I work in Visual Studio 2017 and I want to type an opening curly bracket '{' I hit the right "Alt" key + the double quote key, its the key that is immediately to the left of the Return key on my keyboard. My keyboard language is
"French Canada". That used to work perfectly and it still does anywhere but in VS2017.
Since 10min ago, that combination of keys now comment/uncomment the current line and puts the cursor/caret on the next line...
I have no idea how to undo whatever I might have done that changed the behavior of that key combo.
Humm finally found a way to make things normal again... I went in the resharper options, under Keyboard & Menus and selected "None" under Resharper Ultimate keyboard scheme. the "Visual Studio" scheme has been selected for a year without issues, so I still wonder why that suddenly changed yesterday but at least now I can type my curly brackets '{' the same way I always did.
Related
I am trying out VS2017 (previous using VS2015), and I'm trying to navigate my code using Ctrl+Right/Left. Instead of the typical behavior of moving to the next or previous word, it changes the focus to different UI elements.
Using Ctrl+Arrows I can get to the reference counts from CodeLens, quick actions, and the project and item dropdowns above the text editor. The same result happens when I do Shift+Arrow and Ctrl+Shift+Arrow.
How can I return to a normal text editor behavior?
I fixed this issue by resetting all the settings and uninstalling extensions.
To reset your settings, go to Tools > Import and Export Settings > Reset all settings.
I have some long C & C++ header files with a lot of nested #if statements in them.
#if FOO
...
#elif BLAR
#ifndef WIDGET
#endif
#else
...
#end
Is there a way to jump between matching statements in Eclipse? I have found a similar question that says it is possible in Visual Studio which suggests that the CTRL + ] key combination should do it, but that seems to only work for matching braces.
No, there is not a way. However, this bug report submitted in 2007 requests this feature: https://bugs.eclipse.org/bugs/show_bug.cgi?id=182579.
If you want this feature, go there and vote on it to raise this request's importance and give it more priority. You might also leave a comment.
Until this feature is added, a super lousy sort of work-around, as you suggested, is to use the "Find/Replace" dialog and "Find Next"/"Find Previous" shortcut keys, searching for the # character.
Steps:
Ctrl + F then enter # in the "Find" box. Press the "Find" button. This will jump to the next # character it finds. With the # character now cached in the Find/Replace dialog, you may close the "Find/Replace" dialog box and use the shortcut keys if you like:
Ctrl + K = "Find Next"
Ctrl + Shift + K = "Find Previous"
You may optionally change these keys via the settings under Window --> Preferences --> General --> Keys (source).
You may use CTRL+Shift+L to see the "Show Key Assist" List of shortcuts (depending on the context), as explained by this answer here. Continue pressing CTRL+Shift+L a couple more times to automatically open up the Window --> Preferences --> General --> Keys settings window.
Tested in Eclipse IDE for C/C++ Developers v4.7.3a in Ubuntu 14.04.
Please vote on the Eclipse feature request "bug" above to get the developers to add in a proper solution.
It seem that with the cursor on a #statment Ctrl+k will move down the file to a matching statement while Ctrl+K will move in reverse.
While writing this up I came across a Visual Studio 2010 question: How to jump to matching #if/#elif/#endif statements? This question states that Ctrl K / Ctrl J will do what I want in Visual C++ 6.0.
As shown above, the Eclipse specific key command also uses k.
I also found that Ctrl+L brings up a a list of keyboard shortcuts and lists the Ctrl+k as Find Next and the Ctrl+K as Find Previous. Pressing Ctrl+L a second time takes you to the Preferences > Keys menu where it is possible to add new combinations.
Is there a shortcut in Management Studio 2012 to delete the row where the cursor is.
Except Shift+Del, because this has the side effect on your text saved before with Ctrl+C is deleted after the shortcut.
Is should work like Ctrl+D in Eclipse.
Unfortunately, there is no shortcut in SQL Server Management Studio to delete a row.
Ctrl + x do the deleting job (by cutting and placing to buffer) entire line where the cursor are.
Which can be a useful alternative to setting "delete" shortcut manually.
In case anyone is looking for a way to do this WITHOUT cutting the line to the clipboard, the command you want is called Edit.LineDelete. You can get to it by going to Tools --> Options --> Environment --> Keyboard --> Keyboard and searching for the command in the text box.
You may also need to make sure that the key combination you're assigning it to isn't already being used by anything else.
I think you need to change short cut key from Tools - Options and then Keyboard.
See in below image.
Instead of, Shift + Del you can assign any, you want to set. (Except default keys)
A somewhat similar question has been asked before, but the solution didn't work for me.
For instance, http://www.xtremevbtalk.com/showthread.php?t=99503
Background:
I have a MS Access 2010 database. In my database I have a form with a button. I've programmed the button to open a saved word document, populated book-marked places in the document, then save-as the word document with a name that includes the time (henceforth referred to as the auto-filled document). This all works just fine.
The problem:
If a different MS word document was already open when I clicked the button, then I have trouble closing the resulting auto-filled document. This is what happens:
1) I try to "x" out of my auto-filled word document.
2) the computer tells me that "This file is in use by another application or user // (C:....\Normal.dotm)"
3) I click "ok"
4) it offers to save-as the Normal template.
5) I click "cancel"
6) I try to "x" out of the word application once more.
7) the computer prompts me: "Changes have been made that affect the global template, Normal. Do you want to save those changes?"
8) I click "Don't save"
9) the application closes.
(This only occurs for instances when a word document is already open when I click the button on the form. Otherwise it works perfectly.)
My question:
Normally, I would just shrug and live with these extra few steps, but I'm the one making the database, so I have to think about my users. (Would it mess anything up to save the normal template--step 7?)
I googled this for a while. For similar situations, some people suggested adding objApp.NormalTemplate.Saved = True (where objApp is the Word application object), but this did not work for me.
Can someone please tell me what's going on? Is there a solution?
Any help will be much appreciated.
What you need to do is check to see if an instance of Word is already open. If it is, you might want to let your user know they need to close their Word doc.
' Handle Error In-Line
On Error Resume Next
Set objWord = GetObject(, "Word.Application")
If Err.Number = 429 Then
'If we got an error, that means there was no Word Instance
Set objWord = CreateObject("Word.Application")
Else
Msgbox ("You're going to need to close any open Word docs before you can perform this function.", vbOK)
Exit Sub
End If
'Reset Error Handler
On Error GoTo 0
So when I used to program in java I did it in Eclipse. Whenever my code had all the same margin I just had to select everything and press Ctrl+i.
Now I use Visual Studio Professional for programming in C++
The question is simple enough: How to properly set a margin to the lines of code so that it all looks well and I can easily tell what code belongs inside what brackets.
Thank you beforehand, and I hope this question is not closed. I tried searching for an answer, but found none.
Select what needs formatting and CTRL+K followed by CTRL+F.
Found in the C++ Visual Studio 2010 Keybinding Poster:
Select the code you want to format then:
CTRL + K, F or
CTRL + E, F
Formats the current selection
according to the indentation and
code formatting settings specified on
the Formatting pane under Tools |
Options | Text Editor | C/C++.
You can always find out what the actual shortcut is and use it or customize it:
go to Tools -> Options.
expand Environment, select Keyboard
type 'Format' in the textbox labeled 'Show command containing:'
find the row that reads 'Edit.FormatDocument'
read the value in the 'Shortcuts for selected command:' dropdown
If you want to change it, use a new shortcut key in the 'Press shortcut keys' box, then click 'Assign'.