In Xcode when we hold the mouse down on the "Back" arrow in the panel above the editor area, we get a popup window showing our navigation history. This is also a standard navigation behavior, seen in most Web browsers.
My question: Is there a keyboard shortcut (or XCode plugin) to pop open this Navigation History popup, so we can use arrow keys and quickly move a selection bar down to the item in the history list we would like to navigate to?
Rationale: When working in a given class, we tend to flip back and forth quite a few times between the .m and .h files for the class. Each flip creates an entry in the navigation history. So, to move back to the prior class we were editing, using keyboard shortcuts only, we need to hit the "go back" keyboard shortcut many times, undoing each flip between header/implementation. Seeing the list visually allows us to quickly identify and scroll down to the desired class in the history list, navigating directly there. When editing code, allowing the hands to remain on the keyboard is better.
Another solution could be: A keyboard shortcut to move back to the previous class (or .xib or other "significant" navigation item) rather than the previous file.
Is there a keyboard shortcut (or XCode plugin) to pop open this Navigation History popup
Yes. The standard key binding is Ctrl2, as indicated above. You can check the key bindings panel in Xcode's preferences for the current key binding on your system if there's any chance that you might have changed it.
Related
I recently upgraded to Sublime Text 4. One change is that whenever I click in the sidebar, it takes over keyboard focus. After that I have to click back in an editor pane to give it focus again.
As far as I can tell, Sublime Text 3 didn't do that and I don't recall every having to configure that. I don't find it useful for the sidebar to ever have keyboard focus. Is there a way to turn it off so that clicking the sidebar does not give it keyboard focus?
Please note that this behavior only occurs when you click on the currently focused file in the sidebar. Clicking on any other file, whether it's currently open or not, switches the focus to that file. There is no documented setting or API function controlling this.
If this does happen, you can resume focus of the tab group that was previously focused by hitting Ctrl + the number of the group (1-indexed) your file is in. So, for example, if you have 2 tab groups open and the file you were working on is in group 2, hit Ctrl2. If the window isn't split (so there's just one group), hit Ctrl1.
How do I disable the Xcode auto-display feature of the utilities panel (aka the far right pane that holds the identity inspector etc)?
In full screen mode (coding, not just in the storyboard) whenever my mouse curser gets moved all the way to the right of the screen, the utilities panel displays automatically. It is distracting and unwanted. If I need that panel I can click the button in the upper right to display it, or use a keyboard shortcut. It doesn't seem like anything else is autodisplaying, just the right side panel. Once I move the mouse away from it, the panel disappears again. Maddening I tell you.
I have taken to participating in mouseless Monday's and Friday's. I have set my windows float and dock tabs to hotkeys that allow me to pull them out or put them back in; however, I want to be able to choose which location to put the tabbed document in. I operate in landscape mode so I regularly have a bottom and a top window in visual studio. I would like to press a hotkey and send the selected document to that part of the diamond guide. Anyone know a plugin or how I can do this?
There's an entire article dedicated to navigating the IDE using just the keyboard, with a section on docking windows and tabs using the diamond guide from the keyboard. So yes, it is possible, and you don't need a plugin for it:
To move and dock tool windows from the keyboard
Navigate to the tool window you intend to move and give it focus.
On the Window menu, click Dockable.
Press ALT + Space and then choose Move.
The docking guide diamond appears.
Use the ARROW keys to move the window to a new location.
The mouse pointer moves with the window as you use the ARROW keys.
When you have reached the new location, use the ARROW keys to move the mouse pointer over the correct portion of the guide diamond.
An outline of the tool window appears in the new docking location.
Press ENTER.
The tool window snaps into place at the new docking location.
Alternatively, you can cheat by simply controlling the mouse pointer with the keyboard, through a nifty system accessibility feature called MouseKeys.
I think I remember reading once there is a way to navigate through the different views in Interface Builder using a keyboard shortcut (in other words select a subview that is underneath another subview by clicking on the view) but I can't seem to find what it is. Does anyone know?
There are commands for jumping between clipped (obscured) objects, but they don't have keyboard shortcuts assigned when Xcode is installed. You can set your own shortcuts in Xcode's Key Bindings preference panel, though:
Since you'll never be editing MacOS X and iOS views in the same file, you can go ahead and assign the same shortcut for corresponding commands in each editor, i.e. use one shortcut for both Jump to Next Object with Clipped Content commands.
I wrote a little app that lives in the NSStatusBar. I want to have a global shortcut that when hit, the menu bar's content is displayed, exactly like the behavior of spotlight.
I have added a global key shortcut to my application, but I am unable to get the meun bar to display. How can I do this? I tried with "popUpContextMenu" , but that method displays the menu in the bottom left hand corner, I want the menu to open up right under the NSStatusBar menu icon.
You can do it, apple provides a method for it popUpStatusItemMenu:
I don't think there is a supported way to do this without perhaps using the Accessibility framework to simulate a click on your status item. Regardless, it's probably not a good idea to abuse a menu in this way.
The Spotlight menu bar item does not use an NSMenu, it uses a custom window/view. You might consider going this route if you have some sort of custom view to display.