Why might my Emacs use spaces instead of tabs?

前端 未结 5 1971
情深已故
情深已故 2020-12-11 11:20

I am trying to diagnose this problem. TAB creates 4 spaces instead of a 4 col TAB like I want. But I don\'t think it should because C-h v indent-tabs-mode on th

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-11 11:56

    Check of the file for Emacs "File Local Variables". These specially formatted lines can override your settings when that file is loaded.

    Here is an example from the bottom of a bit of Ruby code, forcing indent to 2 spaces, and tabs converted to spaces:

    # Local Variables:
    # tab-width: 2
    # ruby-indent-level: 2
    # indent-tabs-mode: nil
    # End:
    

提交回复
热议问题