Ubuntu中Atom编辑器显示中文乱码的处理方法

在Ubuntu14.04 64位机上安装Atom,依次在终端输入如下命令:

1. $ sudo add-apt-repository ppa:webupd8team/atom

2. $ sudo apt-get update

3.  $ sudo apt-get install atom


处理中文乱码的问题:

1.      安装文泉驿正黑等相关中文字体:$ sudo apt-get install -y ttf-wqy-zenhei fonts-wqy-zenhei ttf-wqy-microhei

2.      查看系统中文字体:$ fc-list :lang=zh

3.      打开Atom:

(1)、Edit -> Open Your Config,删除原有内容,输入如下内容,保存:

"*":
  "exception-reporting":
    userId: "fe150ae1-7895-9104-88e4-51ddc09f54d7"
  welcome:
    showOnStartup: false
  core: {}
  editor:
    invisibles: {}
    fontFamily: "Ubuntu Mono, DejaVu Sans Mono, 文泉驿等宽正黑"
    fontSize: 15
 (2)、Edit ->Open Your Stylesheet,删除原有内容,输入如下内容,保存:

@mono-font-family:  "Ubuntu Mono", "文泉驿等宽正黑"; /* 等宽字体 */
@font-family: "Ubuntu", "文泉驿正黑"; /* 非等宽字体 */
html, body, ol, ul, li,	h1, h2, h3, h4, h5, h6, div, p, span, pre, section, input, textarea,
	table, .atom-panel, .status-bar, .tree-view, .title, .current-path, .tooltip {
  font-family: @font-family;
}

.autocomplete-plus span, code, .-tree-view-, .symbols-view /*,.editor*/ {
  font-family: @mono-font-family;
}

atom-text-editor.editor {
	font-family: @mono-font-family;
}

.-tree-view- {
	font-size: 14px;
}

4. 关闭Atom,再次打开即可。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值