Bug#354054: vim: octave .m files are not properly indented

Kamaraju Kusumanchi kamaraju at gmail.com
Wed Feb 22 23:10:34 UTC 2006


Package: vim
Version: 1:6.4-007+1
Severity: minor


$cat test.m
for i=1:4
for j=1:4
disp(i*j)
end
end

To format this code, I selected all the 5 lines using V and hit =

But this resulted in the code being formatted as

for i=1:4
	for j=1:4
		disp(i*j)
end
end

I think it is better to indent the code as

for i=1:4
	for j=1:4
		disp(i*j)
	end
end

as that is what one would get, if the user is entering the program line by line
to begin with.

BTW, .m files are octave programs. The above code is a valid octave program. I
am filing it as a minor since it is a cosmetic issue and does not affect the
functionality of the vim as such.

thanks
raju

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-2-686-smp
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages vim depends on:
ii  libc6                        2.3.6-1     GNU C Library: Shared libraries an
ii  libgpmg1                     1.19.6-19   General Purpose Mouse - shared lib
ii  libncurses5                  5.5-1       Shared libraries for terminal hand
ii  vim-common                   1:6.4-007+1 Vi IMproved - Common files
ii  vim-runtime                  1:6.4-007+1 Vi IMproved - Runtime files

vim recommends no packages.

-- no debconf information




More information about the pkg-vim-maintainers mailing list