Q. How do I re-indent the whole file?
A. Visit the file and hit C-x h to mark the whole buffer. Then hit ESC C-\ to re-indent the entire region which you’ve just marked. Or just enter M-x vhdl-indent-buffer.
Q. How do I re-indent the entire function?
A. Hit ESC C-h to mark the entire function. Then hit ESC C-\ to re-indent the entire region which you’ve just marked.
Q. How do I re-indent the current block?
A. First move to the brace which opens the block with ESC C-u, then re-indent that expression with ESC C-q.
Q. How do I re-indent the current statement?
A. First move to the beginning of the statement with ESC a, then re-indent that expression with ESC C-q.
Q. I put
(vhdl-set-offset 'statement-cont 0)
in my .emacs file but I get an error saying thatvhdl-set-offset
’s function definition is void.A. This means that VHDL Mode wasn’t loaded into your Emacs session by the time the
vhdl-set-offset
call was reached, mostly likely because VHDL Mode is being autoloaded. Instead of putting thevhdl-set-offset
line in your top-level .emacs file, put it in yourvhdl-mode-hook
, or simply add the following to the top of your .emacs file:(require 'vhdl-mode)See the sample .emacs file Sample Init File for details.