MATLAB Community

MATLAB, community & more

Scroll less with Editor Bookmarks

When I am working on code, I find that I often need to move back and forth between two places in the code – sometimes several places in the code. The best way to do this in MATLAB is with Bookmarks in the Editor. To add a bookmark in a file, place your caret on the line that you wish to mark, and then select the Go menu, Set/Clear Bookmark menuitem:

set bookmark

You can also use the Ctrl-F2 (On the Mac, Command-F2) keybinding to set a bookmark instead of using the menuitem.

A blue bookmark will be added to the gutter next to the line numbers:

set bookmark

Now you can easily move between bookmarks using the F2 key to move to the next bookmark and the Shift-F2 to go back to the previous bookmark, no matter where you are in the file.

|
  • print

评论

要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。