atom 插件使用時的問題(windows)

注:修改完文件須要ctrl+shift+f5刷新後,才能生效;若不生效,按ctrl+shift+p搜索[插件名]:toggle並單擊.

l1 atom插件

l1-1 markdown-toc

問題: 目錄樹不生效git

解決: 修改了C:\Users\xxxx\.atom\packages\markdown-toc\lib下的Toc.coffee文件,以及把生成的目錄樹頂格寫,才生效.github

__createList: () ->
    list = []
    depthFrom = if @options.depthFrom isnt undefined then @options.depthFrom else 1
    depthTo = if @options.depthTo isnt undefined then @options.depthTo else 6
    indicesOfDepth = Array.apply(null, new Array(depthTo - depthFrom)).map(Number.prototype.valueOf, 0);
    for own i, item of @list
      row = []
      for tab in [depthFrom..item.depth] when tab > depthFrom
          row.push "    "
      if @options.orderedList is 1
        row.push ++indicesOfDepth[item.depth-1] + ". "
        indicesOfDepth = indicesOfDepth.map((value, index) -> if index < item.depth then value else 0)
      else
        row.push "- "

      line = item.line.substr item.depth
      line = line.trim()
      if @options.withLinks is 1
        row.push @___createLink line
      else
        row.push line

      list.push row.join ""
    if list.length > 0
      return list
    return false

l1-1-1 命名規則

開頭不能是數字,不要用..npm

l1-2 markdown-writer

問題: 快捷鍵不能用markdown

解決: 修改C:\Users\zhihao\.atom\packages\markdown-writer\keymaps下的keymap.cson爲:
(這裏ctrl-v被我註釋了,由於下面用了markdown-img-paste插件代替)app

"atom-workspace atom-text-editor:not([mini])":
  "enter": "markdown-writer:insert-new-line"
  "tab":   "markdown-writer:indent-list-line"

  "shift-ctrl-K":  "markdown-writer:insert-link"
  "shift-ctrl-I":  "markdown-writer:insert-image"
  #"ctrl-v":        "markdown-writer:insert-image-clipboard"
  "ctrl-i":        "markdown-writer:toggle-italic-text"
  "ctrl-b":        "markdown-writer:toggle-bold-text"
  "ctrl-'":        "markdown-writer:toggle-code-text"
  "ctrl-k":        "markdown-writer:toggle-keystroke-text"
  "ctrl-h":        "markdown-writer:toggle-strikethrough-text"
  "ctrl-alt-1":    "markdown-writer:toggle-h1"
  "ctrl-alt-2":    "markdown-writer:toggle-h2"
  "ctrl-alt-3":    "markdown-writer:toggle-h3"
  "ctrl-alt-4":    "markdown-writer:toggle-h4"
  "ctrl-alt-5":    "markdown-writer:toggle-h5"
  "shift-ctrl-O":  "markdown-writer:toggle-ol"
  "shift-ctrl-U":  "markdown-writer:toggle-ul"
  "shift-ctrl->":  "markdown-writer:toggle-blockquote"
  'shift-ctrl-"':  "markdown-writer:toggle-codeblock-text"
  "ctrl-j ctrl-p": "markdown-writer:jump-to-previous-heading"
  "ctrl-j ctrl-n": "markdown-writer:jump-to-next-heading"
  "ctrl-j ctrl-d": "markdown-writer:jump-to-reference-definition"
  "ctrl-j ctrl-t": "markdown-writer:jump-to-next-table-cell"

".markdown-writer atom-text-editor[mini]":
  "enter":  "core:confirm"
  "escape": "core:cancel"

l1-3 markdown-preview-plus

可轉字符串爲數學公式:atom

如:spa

$$
  e^{4\pi}+1/{3i}
  $$

可轉成
prototype

l1-4 markdown-img-paste

問題: 鍵位衝突插件

解決: 修改C:\Users\xxxx\.atom\packages\markdown-img-paste\keymaps下的
atom-workspaceatom-workspace atom-text-editor:not([mini])code

l2 離線安裝

在github上下載插件到C:\Users\xxxx\.atom\package目錄下,並在插件目錄內執行 npm install [插件名]

l3 markdown語法問題

  1. 1.2.3.4.上面要空一行,否則無法識別.
  2. ```頂格寫
相關文章
相關標籤/搜索