Search code examples
emacsvala

Emacs and vala-mode


I am using vala-mode to edit Vala code in Emacs. However, I want to change two things in vala-mode:

I want to indent with 4 spaces instead of 2 spaces (which is my Emacs default). I want to enable auto-completion inside vala-mode.

Auto-completion works in all modes except for vala-mode, and I want the 4 spaces indentation only for vala-mode, not all modes. However, I don't know how to make these changes only for vala-mode.

Thank you.


Solution

  • Something like this should work:

    (add-hook 'vala-mode-hook (lambda () (setq c-basic-offset 4)))