help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I paste code at the Octave prompt?


From: Miquel Cabanas
Subject: Re: How do I paste code at the Octave prompt?
Date: Thu, 16 Mar 2006 13:17:07 +0100

hi,

a single tab in a line is ignored by the octave parser, hence

octave> [tab][return]

does nothing, but a 2nd tab in a row will be passed to the underlying
terminal/readline program causing the readline completion question to
show up,

octave> [tab][tab]
Display all 3380 possibilities? (y or n)

notice that I hadn't to press the return key to trigger readline.

This is an intended behavior that allows you to get a list of functions
that begin with some set of characters

octave> pl[tab][tab]
place               plot3               plplot_octave_path
playaudio           plot_border
plot                plplot_octave

You can also use this feature to type the full name of a function while
saving some keystrokes.

A possible fix at Octave's level could be to use a combination of keys
to access this readline feature, ie [ctrl][tab] and ignore all other
[tab] instances, but I do not know whether this can be easily done and
all the implications of such change.

Miquel

On Wed, 2006-03-15 at 17:03 -0800, Keith Goodman wrote:
> On 3/15/06, Bill Denney <address@hidden> wrote:
> > On Wed, 15 Mar 2006, Keith Goodman wrote:
> >
> > > On 3/15/06, Bill Denney <address@hidden> wrote:
> > >> The problem is that your code includes a tab.  The tab starts tab
> > >> completion.  Try changing your editor's preferences so that it inserts 8
> > >> spaces instead of a tab.
> > >
> > > Eight spaces looks like crap. Is there another workaround? [Hint:
> > > sqrt(8+1)]
> >
> > What is your editor and OS?
> 
> Debian GNU/Linux (etch). Gedit 2.12.
> 




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]