[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Text editing question
From: |
Steve C. Thompson |
Subject: |
Re: Text editing question |
Date: |
Thu, 23 Feb 2006 09:09:49 -0800 |
User-agent: |
Mutt/1.5.9i |
On 23 Feb 06 08:56AM, kamaraju kusumanchi wrote:
> I think (in both the above cases) the necessary indentation files are
> not sourced properly. Let's try another method.
>
> open the file by using -u NONE option
>
> $gvim -u NONE temp/test2.m
>
> Then paste your unindented code
>
> Then source the appropriate matlab indentation files ...
>
> :so /usr/share/vim/vim64/indent/matlab.vim
>
> Then select all the lines with V or v or mouse etc., and then press =
>
> Let me know if this works.
Consider:
go = 1;
while
for j = 1 : 10
for i = 1 : 10
a = i;
b = j;
end
end
end
On my system [Kubuntu 5.10 (breezy); VIM - Vi IMproved 6.3,
Included patches: 1-78], using .../indent/matlab.vim, along with
set expandtab
set tabstop=2
set shiftwidth=2
results in:
go = 1;
while
for j = 1 : 10
for i = 1 : 10
a = i;
b = j;
end
end
end
For some reason, the ends don't get properly indented. The
octave.vim script
(http://www.vim.org/scripts/script.php?script_id=1241) seems to
only provide syntax support for endif, endwhile, and so forth.
But, from my testing, it doesn't help with indenting.
Steve
PS:
> Why are you asking this question here?
One sticking point for Matlab users is abandoning Matlab's text
editor. Currently, Octave doesn't exactly have a GUI equivalent.
Personally, I get by fine (I think better) running Octave in
terminals, using Vim as my primary text editor. But this doesn't
appeal to everyone.
Starting the thread here, I think, is appropriate since it falls
in the category of helping Matlab users become GNU Octave users.
-------------------------------------------------------------
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
-------------------------------------------------------------
- Text editing question, Steve C. Thompson, 2006/02/22
- Re: Text editing question, kamaraju kusumanchi, 2006/02/22
- Message not available
- Re: Text editing question, kamaraju kusumanchi, 2006/02/22
- Re: Text editing question, Stefan van der Walt, 2006/02/23
- Re: Text editing question, kamaraju kusumanchi, 2006/02/23
- Re: Text editing question, Stefan van der Walt, 2006/02/23
- Re: Text editing question, Mike Miller, 2006/02/23
- Re: Text editing question,
Steve C. Thompson <=
- Re: Text editing question, kamaraju kusumanchi, 2006/02/23