在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):sumnow/markdown-formatter开源软件地址(OpenSource Url):https://github.com/sumnow/markdown-formatter开源编程语言(OpenSource Language):TypeScript 57.2%开源软件介绍(OpenSource Introduction):markdown-formatterIntroductionThis is a tool to improve the writing efficiency of markdown, not only provides a relatively uniform format for the InstructionsAfter the installation is complete, you may need to restart your vscode. In any
FeatureIgnore file formatIf you want to ignore the current file ( not to be formatted ), you can insert below the code before or after the article
Snippets partFirst of all, You must config like this in "[markdown]": {
// 快速补全
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
} import imageTyping import tableTyping import codeTyping import listTyping Formatter partsymbols
line
tablelistunordered list* TITLE
+ Title
- title
codeFormat the code, by code block
code areaThe default is not formatted. If Tips: Empty lines in the code area cannot exceed one line. Config// enable/disable markdown-formatter
enable = config.get <boolean> ('enable', true);
// fullwidth character translate into halfwidth character, such as `,:;!“”‘’()?。`
// Automatically convert symbols based on context when set to 'auto'
// Don't convert symbols based on context when set to '_' or ''
fullWidthTurnHalfWidth = config.get<string>('fullWidthTurnHalfWidth', 'auto');
// Convert code block to code area, and the default is not converted.
// You can set it by any meaningful strings
// if it is set to js, it will be formatted according to the js language syntax.
codeAreaToBlock = config.get<string>('codeAreaToBlock', '');
// enable/disable format code
// false: disable format code
formatCodes = config.get<boolean>('formatCodes', true);
// config beautifyjs
// {}: config beautifyjs
formatOpt = config.get<any> ('formatOpt', {});
// Format the symbols of the unordered list
// * > + > -
formatULSymbol = config.get<boolean>('formatULSymbol', true);
// Whether a space is required after the full-width or half-width symbol
spaceAfterFullWidthOrHalfWidth = config.get<string>('spaceAfterFullWidthOrHalfWidth', 'half'); How to config configuration exampleYou can refer to my configuration: // settings.json
// markdown-formatter conf
// Convert the code area of unnamed language into code block according to js type
// "markdownFormatter.codeAreaToBlock": "js",
// or not
"markdownFormatter.codeAreaToBlock": "",
// format punctuation automatically
"markdownFormatter.fullWidthTurnHalfWidth": "auto",
// Chinese punctuation formatted to English
// "markdownFormatter.fullWidthTurnHalfWidth": ",:;!“”‘’()?。",
"markdownFormatter.formatOpt": {
"indent_size": 2
},
"[markdown]": {
// auto save
"editor.formatOnSave": false,
// show space
"editor.renderWhitespace": "all",
//
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
//
"editor.snippetSuggestions": "top",
"editor.tabCompletion": "on",
//
"editor.acceptSuggestionOnEnter": "on",
//
"editor.defaultFormatter": "mervin.markdown-formatter"
} Software version and development environmentdevelop versionVSCode version 1.29.1 (macOS Mojave) test versionVSCode version 1.33.1 (macOS Mojave) ContactIf you have any ideas, please contact me. If you know how to format other languages using front-end libraries, please let me know. email: [email protected] or here GratitudeThank you for helping me improve this tool.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论