Skip to Main Content Skip to Search
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Inside the MATLAB Desktop

June 15th, 2007

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.

5 Responses to “Scroll less with Editor Bookmarks”

  1. junziyang replied on :

    Great! I’ll have a try! Thanks!

  2. Markus replied on :

    I have tried the bookmarks, but when I close and re-open a file, they are gone. Like this, the bookmarks are only of very limited use for me.

  3. Ruben Faibish replied on :

    Is there a possibilty to save the bookmarks? I am talking about something similar to the breakpoints that you can get by using dbstatus and then save them. I looked at the java classes that control the MATLAB editor, but I couldn’t find anything related to the bookmarks.

  4. Kristin replied on :

    Not at this time, but we are looking into it.

  5. Hugh Thompson replied on :

    I absolutely agree - the ability to save bookmarks would be a tremendous feature, and I am very surprised it does not already exist. When working with very long, complex files, bookmarks can greatly simplify navigation - but they are of little use if they disappear every time you close the file!

Leave a Reply


Inside the MATLAB Desktop is written by the MATLAB Interface teams.

Team picture
  • Etienne: Hello, Is it possible to change the background color of a particular cell?
  • Ken: No problem Mark…glad to help. Enjoy your font!
  • Mark Andrews: Ken, thanks for replying @3 and giving such clear instructions on how to get this to work.
  • Steve Eddins: Hi Ken, Every year or so I try to find a programming font that would really make me happy. A couple of...
  • Ken: @Jiro: Andale Mono looks nice! I especially like the rendering of the letter “g”.
  • Ken: Hi Mark, The issue your referring to (see the bug report here) was fixed in version 7.5 (R2007b). The problem...
  • Jiro: Ken, That’s a nice font. I use “Andale Mono” which has a similar look. I also like the clear...
  • Queffurust: This is my “cleanup” ; shortcut clc % clear Command Window close all hidden % deletes all...
  • Mark Andrews: Ken, should this work with version 7.0 (R14) on Windows? My favorite font is Consolas, but MATLAB seems...
  • Mark Feldman: Like Bryan (#38) and Kim (#40), I strongly request that you add native vi key bindings to the MATLAB...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.

Related Topics