Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否可以考虑一下代码片段的功能 #213

Closed
ghost opened this issue Jan 30, 2023 · 4 comments
Closed

是否可以考虑一下代码片段的功能 #213

ghost opened this issue Jan 30, 2023 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 30, 2023

类似于 VSCode 的 snippets 功能。
举例

"H1": {
		"scope": "markdown,Markdown",
		"prefix": "/h1",
		"body": [
			"# $0"
		],
		"description": "H2"
	},

在编辑页面中输入 /h1 然后按 tab 即可补全为 #

此功能核心点在于快速补全 markdown 语法格式,但是理论上还有更多用法。

@ghost
Copy link
Author

ghost commented Jan 30, 2023

这个功能可能需求的人比较少?我也只在 文本编辑器如 vscode 和 Sublime Text 等中见过类似的功能,笔记软件就几乎没有做的(也可能是我没找到)

@tw93
Copy link
Owner

tw93 commented Jan 30, 2023

这个思路不错,不过我想是不是我们直接内置就好了?辛苦看看大概有多少?

@ghost
Copy link
Author

ghost commented Jan 31, 2023

这个思路不错,不过我想是不是我们直接内置就好了?辛苦看看大概有多少?

内置也行,这个数量我感觉是个因人而异的东西,其实可以先提供最常用的。

比如说:1-6级标题,行内和多行代码块,行内和多行Latex,图片,链接,表格,两种列表,引用,待办列表,我能想到的目前就这些,一共17个。供您参考。

@tw93
Copy link
Owner

tw93 commented Mar 23, 2023

我最近看了看这个需求,当前其实已经支持这些常用的
image
不过我认为标题、引用这一块直接类似 ### 会不会更快

@tw93 tw93 closed this as completed Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant