Is it possible to bookmark a line in Xcode similar to the “mark” functionality in emacs? Also is there a shortcut used I can use to jump to a line number? My source code is becoming long and hard to navigate.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes; if you place the text caret on the line that you want to bookmark and select
Edit > Add to Bookmarks(or ⌘D) you can add that line to the bookmarks in your project. You can then access these bookmarks from theBookmarksitem in theGroups & Filespane.To go to a certain line, choose
Edit > Go to Line...from the menu (or ⌘L), and type in the line number you want to navigate to.I would also recommend that you use the
#pragma markdirective to help you navigate around in source files. It takes the format:And will show up in the functions popup menu at the top of your source file; it makes it much easier to navigate around your code by grouping together common functions, improving the overall structure and readability of your code.