Thursday, April 29, 2010

Re: How to fix broken automatic indentation in vim

Am 27.04.2010 18:29, schrieb Didlybom:
> Hi,
>
> I am trying to use vim 7.2 (on Windows XP) to automatically indent and
> format some VHDL and Matlab code. To do so I am trying to use the "gg=G"
> command. However this does not work properly. The code is not properly
> indented at all.
> ...

> For VHDL files I get similar problems.
>
> I have tried using different combinations of the autoindent, smartindent and
> cindent settings. After going through these forums I have also made sure
> that the "syntax", "filetype", "filetype indent" and "filetype plugin
> indent" are set to on. Still, it does not work. Also, if I do "set syntax?"
> I get "matlab" for matlab files and "vhdl" for vhdl files which is correct.
> And if I do "set indentexpr?" I get "GetMatlabIndent(v:lnum)" for matlab
> files and "GetVHDLindent()" for vhdl files.
>
> To try to isolate the problem (and ensure that it is not due to one of the
> vim plugins that I have installed) by doing a fresh install of VIM on a
> different computer (in which VIM had never been installed before). On that
> computer I get the same sort of problems (that is why I do not think that I
> need to give you the .vimrc, but if you need it I can upload it here too).

At least for VHDL, you may check the help:

:h ft-vhdl-indent

:let g:vhdl_indent_genportmap = 0

--
Andy

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: