atom 插件使用时的问题(windows)

注:修改完文件需要ctrl+shift+f5刷新后,才能生效;若不生效,按ctrl+shift+p搜索[插件名]:toggle并单击.

l1 atom插件

l1-1 markdown-toc

问题: 目录树不生效

解决: 修改了C:\Users\xxxx\.atom\packages\markdown-toc\lib下的Toc.coffee文件,以及把生成的目录树顶格写,才生效.

__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 命名规则

开头不能是数字,不要用..

l1-2 markdown-writer

问题: 快捷键不能用

解决: 修改C:\Users\zhihao\.atom\packages\markdown-writer\keymaps下的keymap.cson为:
(这里ctrl-v被我注释了,因为下面用了markdown-img-paste插件代替)

"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

可转字符串为数学公式:

5ac6c87926ae2.png

如:

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

可转成
5ac6d3aec5a7f.png

l1-4 markdown-img-paste

问题: 键位冲突

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

l2 离线安装

在github上下载插件到C:\Users\xxxx\.atom\package目录下,并在插件目录内执行 npm install [插件名]

l3 markdown语法问题

  1. 1.2.3.4.上面要空一行,不然没法识别.
  2. ```顶格写

转载于:https://www.cnblogs.com/zhihaowu/p/8718234.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值