help-octave
[Top][All Lists]
Advanced

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

Re: Text editing question


From: kamaraju kusumanchi
Subject: Re: Text editing question
Date: Wed, 22 Feb 2006 17:58:18 -0500
User-agent: Debian Thunderbird 1.0.7 (X11/20051017)

Steve C. Thompson wrote:

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

Select the region that you want to format and hit =

Why are you asking this question here? There is a separate vim users mailing list available. More info on the vim lists can be found at

http://www.vim.org/maillist.php#vim

raju


--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/



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