On Oct 13, 3:23 pm, Jeri Raye <[email protected]> wrote:
> Hi,
>
> gg=G does reindent a file.
>
> Question 1: Is it possible to make this command filetype dependend?

Yes. Turn on filetype indentation instead of autoindent, cindent, or
smartindent, with this in your .vimrc:

filetype plugin indent on

(it is quite likely you already have this)

> Question 2: Is it possible to change the way the indent-ion is done?
>

Yes. After enabling filetype-dependent indentaiton as above, you can
override the indent rules by placing a file in your ~/.vim/indent or
~/.vim/after/indent directory that sets up an appropriate indentexpr
option setting. See contents of $VIMRUNTIME/indent for examples (this
is where you should find the current indent rules for your filetype).

> Reason for asking is:
> I don't like how the indent is done on VHDL files.
> I would like to change it.
>

To change it, you should be able to just copy the file $VIMRUNTIME/
indent/vhdl.vim to ~/.vim/indent and tweak to your liking.

Note, check first to make sure the current file does not contain
options that you can set (e.g. g:vhdl_indent_genportmap) to tweak the
indentation to your liking with no modifications.

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

Reply via email to