如何让js2-mode在Emacs中使用空格而不是标签? [英] How do I get js2-mode to use spaces instead of tabs in Emacs?

查看:112
本文介绍了如何让js2-mode在Emacs中使用空格而不是标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 js2-mode 在Emacs中编辑Javascript,但我可以似乎让它停止使用制表符而不是空格缩进。

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/ js2.

推荐答案

你有没有


(setq-default indent-tabs-mode nil)

在您的.emacs ?当我这样做时,它在emacs 23.0.60.1中对我来说很好js2-mode使用标准的emacs函数indent-to,其中indent-tabs-mode是缩进的。

in your .emacs? It works fine for me in emacs 23.0.60.1 when I do that. js2-mode uses the standard emacs function indent-to, which respects indent-tabs-mode, to do its indenting.

这篇关于如何让js2-mode在Emacs中使用空格而不是标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆