help-octave
[Top][All Lists]
Advanced

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

Text editing question


From: Steve C. Thompson
Subject: Text editing question
Date: Wed, 22 Feb 2006 12:54:56 -0800
User-agent: Mutt/1.5.9i

Hi Group,

Apologies in advance for being a bit off topic.  I have a
question about automatically indenting your code.  For example,
say you have

for i = 1 : 10
  a = i;
end

then you want to add a second loop some time later:

for j = 1 : 10
for i = 1 : 10
  a = i;
  b = j;
end
end

The code should read like:

for j = 1 : 10
  for i = 1 : 10
    a = i;
    b = j
  end
end

Instead of manually indenting the inner loop, I want to do this
automatically.  I know that Matlab's text editor has the
capability. I've also learned that xemacs can do this with:
Cmds > Indent > Region.  But I'm a Vim user.  Does anyone know
how to do this in Vim?

Thanks,
Steve



-------------------------------------------------------------
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]