Question

Surprisingly file .bashrc_custom has Fundamental mode even though files .bashrc and .bash_profile in the same directory have (Shell-script[bash]).

How can I configure major mode for .bashrc_custom?

Was it helpful?

Solution

Put this into your Emacs init file:

(add-to-list 'auto-mode-alist '("\\.bashrc_custom\\'" . sh-mode))

Note possibly directory local variables are not questioned here, it's ruled by a list reading strings resp. regular expressions for matching file-names.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top