注:修改完文件需要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
可转字符串为数学公式:
如:
$$
e^{4\pi}+1/{3i}
$$
可转成
l1-4 markdown-img-paste
问题: 键位冲突
解决: 修改C:\Users\xxxx\.atom\packages\markdown-img-paste\keymaps
下的atom-workspace
为atom-workspace atom-text-editor:not([mini])
l2 离线安装
在github上下载插件到C:\Users\xxxx\.atom\package
目录下,并在插件目录内执行 npm install [插件名]
l3 markdown语法问题
- 1.2.3.4.上面要空一行,不然没法识别.
```
顶格写