File Exchange

image thumbnail

Enhanced help--improve your workflow

version 1.0 (9.64 KB) by

Simple enhancement to help listings: adds hyperlinks to open files for editing.

1 Download


View License

Now you can open up m-files for editing directly from help listings.

1) Adds an 'Edit this file' link at the end of every help listing for individual functions. Clicking opens file in editor.

2) Contents pages have an edit hyperlink by each file name and an 'Edit this directory's Contents file' to edit the Contents file itself.

It's simple, but surprisingly useful and has been a timesaver in navigating project files, so I would like to share it.

See screenshot for examples of this in use.

Background: Help already shows hyperlinks to other help pages and documentation. This is a simple extension of that concept to link to files directly for editing.

Possible uses: Use Contents pages as a hub for editing your files. A simple form of project management. Keep Contents pages up to date. Easily explore new functions, or work on old ones.

See files for more details.

Comments and Ratings (4)

xu ning

It is quite interesting!Thank you john!

John Iversen

A new version has been posted and should show up soon.

When it appears, the installation instructions in the previous post can be disregarded.

John Iversen

Thank you for the comments.

I agree with you that the installation method is not good. Fortunately, your suggestion lead me to think of a better way that doesn't require altering your matlab distribution:

Simply copy the original help.m file, unaltered, into your own working directory tree. This will then be found before the original one in the toolbox directories, and it will be able to find the modified makehelphyper.m


edit help %opens matlab-supplied help.m
%from editor "save as" into one of your working directories (one that will be searched before the matlab toolbox directories).
which help %verify it's picking up your 'override' copy
%place makehelphyper.m (from this posting) in any place matlab can find it (the same directory as your copied help makes sense--I've created a directory called overrides for this purpose).

%now when you run help, it'll run your identical copy, which will then find the modified makehelphyper.

This is much better! Thanks.

I've looked into the same directory/m-file bug you mentioned and see the problem. I'll upload a corrected version soon.

John D'Errico

This is a neat idea, although I'd rather not be forced to replace the existing (private) function. The helptools have makehelphyper.m in private, so I don't see an alternative.

One bug I found is if you have a function in a directory of the same name, then this code gets confused. It does not create a correct link to edit your function at the end of the help.

I'll change my rating to a 5 if this bug is repaired, though I'll still recommend this code as a pick of the week to Doug.

MATLAB Release
MATLAB 7.0.1 (R14SP1)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video