In Visual Studio I can navigate backwards by pressing Ctrl + -. This is very useful when checking out the definition of a function and then immediately going back to the code I was working on.
How can I do this in Xcode? (I'm using version 3.1.2)
* Writing this if people using Xcode 4 need the answer for their versions:
In Xcode 4 preferences, it's configured to be ^ + ⌘ + ← (control-command-left arrow) to navigate back and ^ + ⌘ + → (control-command-right arrow) to navigate forwards.
Xcode 3.1.x is admittedly a bit weak in this respect. Happily, the navigation #zoul mentions (The back/forward arrows in the header bar, or ⌘⌥← and ⌘⌥→) is significantly improved in Snow Leopard, and should provide the finer-grained navigation you're hoping for. Sorry there's not an immediate solution, but hopefully it helps to know that a fix is coming...
There’s a Cmd + Alt + ← that goes back in editor history, and conversely Cmd + Alt + → that browses forward. (Not sure if this is exactly what you are looking for.) It goes well with Cmd + Alt + ↑ that switches between the header and the implementation file.
There are small arrows on top left corner of editor pane in Xcode.
On Macs with multitouch trackpads, you can also use three-finger-swipe left and right to navigate through the file history.
Also re: MrDatabase's comments on stefanB's response, if you've been actually jumping from definition to definition (by, for instance, holding down Command and clicking on a symbol) as opposed to just scrolling, I believe that the file history should track navigation even within the same file... perhaps that was a change in Xcode 3.1.3.
Control + Command + Arrow keys work for me.
Other than the 'complete shortcut list', I don't know.
You can find previous with ⇧⌘G, but that's not really what you were after I think.
In Xcode 13.0.0 you can use:
(OS: Mac 11.6)
Control + Command + → or ←
Hope this help!
Related
I am looking for a shortcut to move the current tab left and right through the tab list. Note that I don't want to switch to the left or right tab with the Cmd+{, Cmd+} shortcuts, but to move the tab.
try iterm2, http://iterm2.com/#/section/home
command + left or right arrow to switch tabs
command + shift + left or right to move tabs
According to Terminal -> Preference -> General,
Command + Ordinal can be used to switch tabs, (Ordinal between 1 to 9)
e.g.: Command + 1: switch to the first tab (left-most tab).
you can add a shortcut to have command+left/right arrow go to previous/next tab:
No, it is not possible to move tabs using keyboard on Terminal app.
I would need to drag them by cursor or try iTerm2 instead.
I don't think you can, and it doesn't appear on any shortcut list i have seen for any browser or application :/
however there seems to be a plugin of sorts for Chrome which does this:
plugin link that might work.
I am porting a huge C++ project to OS X. After my initial compile with Xcode I have multiple errors in many files I want to investigate.
Problem is that the issue navigator shows all files non collapsed after each compile:
So I have to collapse all of them by hand (there a a lot of files) after each compile to have an overview of a files which need fixing.
Is there a hotkey or a setting to collapse all files?
cmd ⌘-click one of the little disclosure triangles to collapse (or expand) all rows.
let me add some extra info, when tapping a main item
hold ⌘ to : close a type of warnings
hold shift & ⌘ to : close all types of warnings
go to the most top level of issue and alt + <- keyboard arrow key that will close that issue and when you use alt + -> to open the issue again. all issue is collapse
Back Arrow Broken In Xcode?
Is there keyboard command to go back/forward one file at a time.
Xcode 3.2 changed the behavior of Cmd-Opt <-- and -->. As noted in another question, they do not operate on a file level like in previous versions of Xcode, but on an "edit point", making it cumbersome to flip through a list of files (the quick way to do it, since Xcode does not support Tabs, as in Eclipse).
Rob Keniger found a partial solution that he noted in another post:
"Hold down the option key while you click the forward/backward arrows ..."
But this requires fiddling with the mouse. Is there any way to do it with the keyboard only?
EDIT:
Later versions of Xcode (v7.2+) now have a Navigate menu (and it changes the keyboard shortcuts yet again):
In XCode 4.4 the following sequence works:
Cmd + Ctrl + ←
and it operates on a file level.
On Xcode 8 I use 2 fingers left / right
Beginning in XCode 3.2.3, the following key sequence works:
Cmd + Option + Shift + ←
Without the Shift key, it just goes back to the previous cursor position. Adding Shift jumps to the previous file (next file, in combination with →).
Navigation shortcuts for Xcode
Is there a keyboard shortcut to display tooltips provided by Visual Studio & Resharper when you hover over a bit of code? I'm already aware of Quick Documentation (Ctrl + Q) and Quick Watch (Ctrl + Alt + Q).
Do you mean Ctrl + K, Ctrl + I? This is the command Edit.Quickinfo.
(sorry, I am unable to add a comment with the PC I have now)
For the single variable, do you mean in debug mode ?
2nd Edit: I think VS names these tooltips 'datatips'. Unfortunately, there is no command to show them, so no possible shortcut.
You can do it by binding this command to a key:
EditorContextMenus.CodeWindow.PinToSource
Unfortunately it works with what you have selected, not with what you are hovering over. Not only do you have to do the extra click, but you need to select the entire variable name and all of its prefixes as well.
Old question but useful to know.
My shortcuts:
PinToSource set to alt-F1
ClearAllDataTips set to shift-alt-F1
CTRL+ALT+Q
It is equivalent to
SHIFT+F9
You know in Xcode, you can press option - command - left/right arrows to switch between multiple files. But what are these files?
They seem to be the ones that have been opened. But is there any way to check what they are? And close some unwanted ones.
Or, any other way you know to switch between files??
alt text http://img19.imageshack.us/img19/8724/picture4asx.png
if you click on untitled.m it will bring up the 'history' although it really functions more like multiple open documents per window.
The 2 arrows to the left of it are equivalent to the command+option+arrow
command+shift+W will close the current open document and open the most recent
I dearly miss ctrl+tab for recent document list like in Visual Studio, Eclipse and others. They do it with the application switcher so why not in their editors ? And whats up with "Command + Option + Shift + T" shortcuts ? One thing I have noticed after switching to Mac is the use of lame shortcuts like that, "press cmd+ctrl+option+]+k to open bla bla". Have Apple developers 4 hands or something ? If I want to indent multiple lines it should have been just tab.
Apple and 3rd party developers doesn't seem to follow a standard like they do in the windows world, every app has its own way of doing things.
Your guess about
They seem to be the ones that have
been opened
is correct.
Here is some ways you can use to switch between files.
^1 popups loaded files
Command + Option + Up to switch between declaration and implementation files.
Command + Shift + D to quick open project related file.
Command + Option + Shift + T to reveal your file in the group list. And then select related one.
"Popup of include files" is also good one to browse files related to the current one.
"View -> Smart Groups -> All Files | Symbols | etc " and then Tab and type first letters. Tab. And choose one you want. Bind some keys for that.
Simpliest: Two finger swiping on the trackpad left-and-right.
Command + Option + left / right arrows - collapse code
Command + Ctrl + up / down arrows - switch between .h and .m
Command + Ctrl + left / right arrows - move backward / forward