1

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?

4

1 回答 1

2

把它放到你的 Emacs 初始化文件中:

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

注意可能目录局部变量在这里没有受到质疑,它由一个读取字符串的列表统治。匹配文件名的正则表达式。

于 2013-07-09T05:55:38.290 回答