Ubuntu中Atom編輯器顯示中文亂碼的處理方法

來源:互聯網
上載者:User

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,再次開啟即可。

Ubuntu 下通過 PPA 安裝 Atom

非官方構建的 Windows 下的 Atom 編輯器

在Ubuntu下編譯安裝Atom編輯器

Ubuntu 及衍生系統安裝 Atom 0.104.0

Ubuntu/Linux Mint上安裝Atom文字編輯器

Github Atom 的詳細介紹:請點這裡
Github Atom 的:請點這裡

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.