Emacs: Set tab indent for just one file on the fly

前端 未结 6 1510
无人及你
无人及你 2021-02-01 17:02

I work on an open source project where the creator sets his tab-indents to 2 spaces.

I\'d like to just enable it on the fly for the one file I work on and not other fil

6条回答
  •  被撕碎了的回忆
    2021-02-01 18:06

    The easiest way to do this for a single buffer is to use M-x set-variable.

    1. Type M-x set-variable and press enter
    2. When prompted for the variable to set, set tab-width then press enter
    3. You'll be prompted with the line Set tab-width (buffer-local) to value:. Put the value you want, then hit enter

    The buffer should instantly be updated with the new value.

提交回复
热议问题