Visual Studio go to bookmark only inside current file - c++

Is it possible to go to the next/prev bookmark only inside the current file? I'm using VS 2010 and I find it extremly annoying that it jumps always across all files when I want to navigate inside the current file only.

Yes. Go to "customize" (right click on the toolbox area, choose customize) ->commands->keyboard, choose edit.NextBookmarkInDocument and associate it with a shortcut.
In addition, you can add it as a button in the text editor toolbar. Go to to text editor toolbar, press the little mark on the bottom-right,and choose the appropriate button to add.

Set bookmarks to stay in one file in Visual Studio 2019
In the Search box at the very top menu, put in ‘customize’ and hit Enter’.
A complex box comes up, but I simply clicked on a button at the bottom labelled ‘Keyboard’, which is where keyboard shortcuts can be set up.
That brings up another huge box. In the left hand pane is Environment and under that is Keyboard. I guess that the way I went in is why this was expanded and already selected, so there must be other ways to get to the same place.
In a right hand pane is now a huge list of commands that can have shortcuts attached!
The ones to scroll to (enlarge the box or the scroll bar is a joke. A slight move scrolls dozens of lines!) are Edit.NextBookmarkInDocument and Edit.PreviousBookmarkInDocument. (similar commands without ‘inDocument on the end are what f2/ shift f2 do by default and jumps between files rather than staying in the same document.)
When you select a command you can then just click on the field labelled ‘Press shortcut keys’ and then press the keys you want to be the shortcut for that command.
I assigned Edit.NextBookmarkInDocument to f2, which then replaces the old f2 that jumps from file to file, and shift f2 for Edit.PreviousBookmarkInDocument. You have to press the ‘Assign’ button to make VS remember the change. After this, bookmark jumps stay in the same file. I guess you could choose any shortcut you fancy, and it does at least show you if that shortcut is assigned and what it is assigned to.
There are some features which I have not explored, like when I use f2 it shows it is assigned to ‘Rename’ but it seems to not effect that function at all when you reassign and just takes it away from the jump between files command version. Maybe someone would like to delve deeper, but what I did worked without any side effects and renames outside of VS still worked with f2 so I have no idea what it was going on about.

Related

Desktop Navigation Menu, How to fix the problem when you click?

help please, I can not understand what the problem is. When you click on the drop-down menu, opens a completely different tab, which is located above.
The page itself opens correct.
But the menu unfolds is not correct.
What i want to see
Any thoughts? Maybe this is done in the settings?
To edit the Menu you go into Shared Components-Navigation Menu.
Not sure what your problem is, but it could be something to do with how those are sorted.
What you need is for all the top layer tobs(the ones you have w/o names) to have no parent, and each have its contained tabs marked with it as parent.
And maybe try changing their sequence so that all the second layer tabs are in sequence between the top layer tabs(say your first top layer tab is sequence 1000, and your second top layer tab is 2000, make sure all the second layer tabs belonging to the first top layer tab are marked with the correct parent entry, and are numbered between 1000 and 2000).
I hope this resolves whatever bug you have.

DevExpress CodeRush: multicursor replacement

In Sublime Text there's a way to highlight all similar strings by setting a cursor to every one of them, and then you can just type something, and this text will be printed in every highlight area. In rus version it's called "multicursor".
Is there something like that in CodeRush?
I know about "Replace all" function in Visual Studio. But this approach is not as convenient as the approach described earlier.
Something like that you can see in Rename feature of CodeRush.
Documentation:
When the Rename is activated, it turns all references to the selected
variable into the linked identifiers.
Linked identifiers are related sections that are kept synchronized. If
you change the text within one of them, all others get updated
accordingly.
There are also the Multi-Select feature which allows you to select separate text blocks by pressing CTRL + ALT + ENTER, but this feature does not allows you to edit every highlight area:

Two column TPopupMenu to list shortcuts right aligned

Using Borland/CodeGear/Ebarcadero C++ Builder 2009. Is it possible to show shortcuts (or other text), right aligned in a second column in a TPopupMenu ?
For instance:
[image] Open File ctrl-O
[image] Close File ctrl-W
[image] BlahBlah ctrl-B
etc.
If so, how ?
I checked the break property on an item, but the results is not exactly what I want, since items are selectable on their own, instead of the complete line. Also it's not drawn that nicely.
Your feedback appreciated.
A menu item can have an image (see the TMenuItem.ImageIndex property), and can have a shortcut assigned (see the TMenuItem.ShortCut property). The VCL will automatically draw those elements for you, exactly as you have shown.
By default, they are a little squished together. You can use the TMenuItem.OnMeasureItem event to extend the Width:
If you still do not like the way the default drawing looks, or you want different text than the ShortCut to appear on the right side, you will have to owner-draw the menu items yourself (see the TMenuItem.OnDrawItem and TMenuItem.OnAdvancedDrawItem events), then you can make the menu items appear however you want.

Underlining first letter of Label C++ (Underline doesn't show)

Problem:
I wish to underline the first letter of certain static text controls (such as Login and Password). The letters become underlined when the ALT key is pressed.
What I have tried:
In C#, I was able to acheive this by using an ampersand. Such as "&Log in" or "&Password". I am trying to find a similar method in C++. The below picture shows an example in C#:
I am using MFC/C++ in Visual Studio 2010.
Edit:
Added information about the ALT key. Here is an example of what I am trying in Visual Studio 2010's properties box. I am adding an ampersand to the front of the "Caption"'s text.
When I run my program in the debugger, the first letter is not underlined (until ALT is pressed):
There's a fundamental difference between a menu and a static control.
To do this in a menu, you do it just like in C#. Here's a screen shot of editing a menu in a C++ project:
...and here's the result:
For a static control, you have to clear the SS_NOPREFIX style for the control to get the same behavior. However, it's been my observation that under some circumstances the underline doesn't show (but I haven't ever pinned down the precise circumstances under which the underline didn't show--I think when it happened, I fixed it by changing the font, but I don't remember for sure).
After help from the SO community, it seems that using the ampersand (&) symbol before the desired underlined letter is the correct way. There was a setting on my personal machine that would keep the underlined letters hidden until the ALT key was pressed.
According to the MSDN:
A user often has to press ALT in order to see access key designations. To ensure that you address them throughout the development process, set your computer to persistently display access keys.
In Windows 8: Open Control Panel -> Ease of Access Center -> Make the Keyboard easier to use.
At the bottom of the screen, check "Underline keyboard shortcuts and access keys".

SAS Hotkey permanent binding

I know F9 opens the definitions windows in SAS Enhanced Editor but the changes made here seem to last only for the current session.
Is there a way to configure SAS so that the hotkeys stay effective for any subsequent sessions ?
Check the 'Save settings on exit' option is selected in 'preferences' (Menu: Tools -> Options -> Preferences). This option should be on the 'General' tab. I can't be sure this will do the trick though but I expect so.
Go here to read more about it:- http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#customizing.htm
Typing 'keys' in the command box brings up current assignment of all hotkeys in SAS. You can edit these and save the keys. As you noted, you can only have one copy of SAS up and running to do this (or you have to do it on the version you opened first that locked the .profile).
You can also map the hotkeys to several commands.
For example, I have F8 mapped to do the following:
out;clear;log;clear;wpgm;submit;log;top;
That clears current output (if you still use ods listing), clears the current log, submits contents of program editor, and then positions cursor at top of log window for review.
Cheers,
john