Emacs缩进,使用选项卡为shell和空格c [英] Emacs indent, use tab for shell and spaces for c

查看:118
本文介绍了Emacs缩进,使用选项卡为shell和空格c的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法配置emacs,所以C文件缩进四个空格和shell脚本与tab?

解决方案

例如:

 (add-hook'c-mode-common-hook(lambda()
(setq indent-tabs-mode nil)
(set c-basic-offset 4)))

(add-hook'sh-mode-hook(lambda()(setq indent-tabs-mode t)))


Is there a way to configure emacs so C-files are indented with four spaces and shell scripts with tab?

解决方案

For instance:

(add-hook 'c-mode-common-hook (lambda ()
                                (setq indent-tabs-mode nil)
                                (set c-basic-offset 4)))

(add-hook 'sh-mode-hook (lambda () (setq indent-tabs-mode t)))

这篇关于Emacs缩进,使用选项卡为shell和空格c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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