How do I get js2-mode to use spaces instead of tabs in Emacs?

后端 未结 3 649
一向
一向 2021-02-07 01:53

I am using js2-mode to edit Javascript in Emacs, but I can\'t seem to get it to stop using tabs instead of spaces for indentation. My other modes work fine, just having issues w

3条回答
  •  礼貌的吻别
    2021-02-07 02:41

    Add this to your .emacs file somewhere after you load js2 mode:

    (setq js2-mode-hook
      '(lambda () (progn
        (set-variable 'indent-tabs-mode nil))))
    

提交回复
热议问题