0

I started coding in vhdl and I'm currently using emacs with its vhdl mode as editor on Ubuntu 16.04 OS. However i was wondering if its possible to start emacs already in vhdl mode, meaning I won't have to enable the vhdl mode every time after starting emacs (m-x vhdl-mode).

  • Do you want your scratch buffer to start in vhdl-mode? – DoMiNeLa10 Nov 9 '17 at 5:50
1

Emacs as a whole doesn't have a "vhdl-mode", because you can use several buffers at the same times in the same Emacs session, with some buffers using vhdl-mode while others use verilog-mode.

The mode used for a file is usually decided based on the file name, using auto-mode-alist. So what you want to do is to make sure your files have names that are recognized as "files using vhdl-mode" by auto-mode-alist.

If your file names have the shape <foo>.vhdl or <foo>.vhd then Emacs should automatically use vhdl-mode for them. If your file names look different (e.g. they have the shape <foo>.myext), then explain it to Emacs:

(add-to-list 'auto-mode-alist '("\\.myext\\'" . vhdl-mode))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.