Bug#707716: vim: [vim] C++: Class declaration does not indent correctly if first statement is not access specifier.
Plug Gulp
plug.gulp at gmail.com
Fri May 10 16:00:41 UTC 2013
Package: vim
Version: 2:7.3.547-7
Severity: normal
Dear Vim Maintainer(s),
The indentation of a C++ class is incorrect if the first statement of the class declaration is not an access specifier (public, protected or private).
Following is an example of a C++ class whose first statement is not access specifier, and the related indentation problem in Vim:
class Test
{
int i;
public:
Test(int k)
{
i = k;
}
private:
void Func()
{
++i;
}
};
The expected output should be as follows:
class Test
{
int i;
public:
Test(int k)
{
i = k;
}
private:
void Func()
{
++i;
}
};
The editor was started using various commandline options as suggested by the bug reporting tool:
vim -u NONE -U NONE -N test.hpp
vim -u NORC -U NORC -N test.hpp
vim -u NORC -U NORC --cmd 'filetype plugin indent on' -N test.hpp
vim test.hpp
No other configuration settings for Vim were changed.
Thanks and regards,
~Ajit
-- Package-specific info:
--- real paths of main Vim binaries ---
/usr/bin/vi is /usr/bin/vim.basic
/usr/bin/vim is /usr/bin/vim.basic
-- System Information:
Debian Release: 7.0
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages vim depends on:
ii libacl1 2.2.51-8
ii libc6 2.13-38
ii libgpm2 1.20.4-6
ii libselinux1 2.1.9-5
ii libtinfo5 5.9-10
ii vim-common 2:7.3.547-7
ii vim-runtime 2:7.3.547-7
vim recommends no packages.
Versions of packages vim suggests:
pn ctags <none>
pn vim-doc <none>
pn vim-scripts <none>
-- no debconf information
More information about the pkg-vim-maintainers
mailing list