Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Key bindings?

Subject: Key bindings?

From: Ishmael

Date: 15 Jan, 2008 23:13:06

Message: 1 of 7

There is one keyboard shortcut that I find so useful in Matlab 6.5
that it keeps me from using the new Matlab 7.5 we just bought at
work. It is the following:

Control - h

In Matlab 6.5, you could select a word, then click Control-h to very
quickly find subsequent occurrences of that word. Control-Shift-H
searched backwards. This avoided the need for using the slow search/
replace gui (also very useful, don't get me wrong). How do I get the
Matlab 7.5 editor to behave this way? (Note that F3, which is
labelled 'Find Next' in the pull-down menu, does NOT work).

Thanks a million for your help!

Subject: Key bindings?

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 15 Jan, 2008 23:25:04

Message: 2 of 7

In article <379e5650-0a7c-49a9-b7a0-0e21fd725e8f@i29g2000prf.googlegroups.com>,
Ishmael <stahl.karl@gmail.com> wrote:
>In Matlab 6.5, you could select a word, then click Control-h to very
>quickly find subsequent occurrences of that word. Control-Shift-H
>searched backwards. This avoided the need for using the slow search/
>replace gui (also very useful, don't get me wrong). How do I get the
>Matlab 7.5 editor to behave this way? (Note that F3, which is
>labelled 'Find Next' in the pull-down menu, does NOT work).

I don't have an exact answer for that, but possibly for your purposes,
control-S (search forward) and control-R (search backwards) would
be useful. Both are incremental searches: you start typing the
target string and it repositions you as you go. To find the next
occurance, control-S or control-R again while you are already in
this search mode.

This is not the same as picking up something already selected,
but it is much much faster than going through the control-h
search and replace gui.
--
  "There are some ideas so wrong that only a very intelligent person
  could believe in them." -- George Orwell

Subject: Key bindings?

From: Doug Schwarz

Date: 15 Jan, 2008 23:55:23

Message: 3 of 7

In article
<379e5650-0a7c-49a9-b7a0-0e21fd725e8f@i29g2000prf.googlegroups.com>,
 Ishmael <stahl.karl@gmail.com> wrote:

> There is one keyboard shortcut that I find so useful in Matlab 6.5
> that it keeps me from using the new Matlab 7.5 we just bought at
> work. It is the following:
>
> Control - h
>
> In Matlab 6.5, you could select a word, then click Control-h to very
> quickly find subsequent occurrences of that word. Control-Shift-H
> searched backwards. This avoided the need for using the slow search/
> replace gui (also very useful, don't get me wrong). How do I get the
> Matlab 7.5 editor to behave this way? (Note that F3, which is
> labelled 'Find Next' in the pull-down menu, does NOT work).
>
> Thanks a million for your help!


On Windows, use Control-F3 to "Find Selection".

--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.

Subject: Key bindings?

From: Ishmael

Date: 15 Jan, 2008 23:56:17

Message: 4 of 7

On Jan 15, 3:25 pm, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson)
wrote:
> In article <379e5650-0a7c-49a9-b7a0-0e21fd725...@i29g2000prf.googlegroups.com>,
>
> Ishmael <stahl.k...@gmail.com> wrote:
> >In Matlab 6.5, you could select a word, then click Control-h to very
> >quickly find subsequent occurrences of that word. Control-Shift-H
> >searched backwards. This avoided the need for using the slow search/
> >replace gui (also very useful, don't get me wrong). How do I get the
> >Matlab 7.5 editor to behave this way? (Note that F3, which is
> >labelled 'Find Next' in the pull-down menu, does NOT work).
>
> I don't have an exact answer for that, but possibly for your purposes,
> control-S (search forward) and control-R (search backwards) would
> be useful. Both are incremental searches: you start typing the
> target string and it repositions you as you go. To find the next
> occurance, control-S or control-R again while you are already in
> this search mode.
>
> This is not the same as picking up something already selected,
> but it is much much faster than going through the control-h
> search and replace gui.
> --
> "There are some ideas so wrong that only a very intelligent person
> could believe in them." -- George Orwell

Thanks, I've been using Ctrl-S for lack of a better option, but it's
still not nearly as efficient as selecting the text you want to search
for without having to type it in each time - it's something I do so
often that it I really miss the speed of it. On a side note, does
anyone know how to enable this same feature in Emacs?

Subject: Key bindings?

From: Ishmael

Date: 16 Jan, 2008 01:32:14

Message: 5 of 7


Ah, perfect! I missed that, even though it was right there in front
of me - arrgh! Control-F3 works (on Unix too). Now if there were
just a way to change the shortcut mappings...


On Jan 15, 3:55 pm, Doug Schwarz <s...@sig.for.address.edu> wrote:
> In article
> <379e5650-0a7c-49a9-b7a0-0e21fd725...@i29g2000prf.googlegroups.com>,
>
> Ishmael <stahl.k...@gmail.com> wrote:
> > There is one keyboard shortcut that I find so useful in Matlab 6.5
> > that it keeps me from using the new Matlab 7.5 we just bought at
> > work. It is the following:
>
> > Control - h
>
> > In Matlab 6.5, you could select a word, then click Control-h to very
> > quickly find subsequent occurrences of that word. Control-Shift-H
> > searched backwards. This avoided the need for using the slow search/
> > replace gui (also very useful, don't get me wrong). How do I get the
> > Matlab 7.5 editor to behave this way? (Note that F3, which is
> > labelled 'Find Next' in the pull-down menu, does NOT work).
>
> > Thanks a million for your help!
>
> On Windows, use Control-F3 to "Find Selection".
>
> --
> Doug Schwarz
> dmschwarz&ieee,org
> Make obvious changes to get real email address.

Subject: Key bindings?

From: Peter Boettcher

Date: 16 Jan, 2008 14:32:10

Message: 6 of 7

Ishmael <stahl.karl@gmail.com> writes:

> Thanks, I've been using Ctrl-S for lack of a better option, but it's
> still not nearly as efficient as selecting the text you want to search
> for without having to type it in each time - it's something I do so
> often that it I really miss the speed of it. On a side note, does
> anyone know how to enable this same feature in Emacs?

In Emacs, Ctrl-S incremental search has lots of neat features. Put the
cursor at the beginning of the word you want to search for. Ctrl-S to
start incremental search. Ctrl-W to copy the word at the cursor into
the search string. Repeat Ctrl-W as necessary to expand the search
string. Then Ctrl-S again to start searching for it.

Or Meta-Y to drop in the last killed string.

To read the appropriate help text, ask Emacs for help on the Ctrl-S
keybinding:

Ctrl-H k Ctrl-S

-Peter

Subject: Key bindings?

From: Yair Altman

Date: 1 Jul, 2009 20:48:01

Message: 7 of 7

Ishmael <stahl.karl@gmail.com> wrote...
>
> Ah, perfect! I missed that, even though it was right there in front
> of me - arrgh! Control-F3 works (on Unix too). Now if there were
> just a way to change the shortcut mappings...


For anyone interested, I have now uploaded to the File Exchange a utility called EditorMacro, which enables assigning keyboard macros in the Matlab editor: http://www.mathworks.com/matlabcentral/fileexchange/24615

A technical description of the solution underlying this utility can be found here: http://UndocumentedMatlab.com/blog/EditorMacro/

While this utility [still] does not override the default editor key bindings - it acts independently so both the default action and the user macro will execute. However, it does enable setting static and dynamic user-defined editor macros and to bind these macros to keyboard shortcuts.

Note that this utility, although tested for Matlab versions 6.0 (R12) through 7.7 (R2008b), relies on undocumented and unsupported Matlab functionality which may break in future Matlab releases.

Feedback is most welcome
enjoy :-)

Yair Altman
http://UndocumentedMatlab.com
 

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us