I couldn't find a way to put a bookmark inside the code in XCode 4. I know about the #pragma mark
thing but it's not what I'm looking for. What I need is something that I can put and remove with a mouse click and navigate amongst with next and previous, like in VS.
Is there anything that I'm missing?
You can install an Xcode plugin called "XBookmark".
This plugin provide features below :
How to install XBookmark:
Now, you can see menus about bookmarks in the Edit Menu.
PS : This plugin is open source.
Another option, if anyone is still interested. The following directives will both produce a compiler warning that you can use as a bookmark:
or
If you want to place bookmarks using your mouse: create a code snippet with one of the 2 directives above. Drag & drop it to the line in your source file that you want bookmarked.
Navigate to next/previous with: Cmd-' and Cmd-Shift-'
Write below comment in your source file that you want bookmarked.
And you can navigate to next / previous with: '^/' or '^?'
thanks
Bookmarks seem to have gone the way of the dinosaur in Xcode 4. This wouldn't have been so bad had the jump-to-bookmark popup above the editor in previous versions not also disappeared. The best replacement currently seems to be to use breakpoints (disabled individually, of course) and navigate with the Breakpoint Navigator.
Shortcut to breakpoints is
Cmmd + 7
. Once there use arrow keysFile a bug report at http://bugreporter.apple.com if you feel something like this should be brought back.
Like npellow's answer to this question of mine, appCode by JetBrains has also made this possible. So, this may be another reason to use appCode instead of Xcode4, except that it won't be free later in time.
In Xcode 4.4, if you leave a comment with this format:
it will be added as a listing in the jump bar alongside the list of methods in your current file, and then you can jump straight to that comment from that menu.