> For the complete documentation index, see [llms.txt](https://chanshiyu.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chanshiyu.gitbook.io/blog/shi-yu/2020/03-wen-xin-diao-long.md).

# 03 文心雕龙

夫『文心』者，言为文之用心也，文果载心，余心有寄。『雕龙』者，振叶以寻根，观澜而索源。心定而后结音，理正而后摛藻，使文不灭质，博不溺心，正采耀乎朱蓝，间色屏于红紫，乃可谓雕琢其章，彬彬君子矣。

何谓[『文心雕龙』](https://www.zhihu.com/question/19631406/answer/555966763)？以上作解。

在前文[一种优雅の笔记方式](https://chanshiyu.com/#/post/99)中咱提到 gitbook 是一个非常适合个人的笔记平台，配合 vscode 双剑合璧，所向披靡，是咱目前首选的写作方式。

除了优秀的写作平台，写作规范也很重要，作为完美主义和强迫症晚期患者，遵循严格的写作标准，对文章创作亦大有裨益。可能没有足够的词藻堆砌斐然的文章，但用严格的标准来约束文章的结构规范亦不失是一种补救，『文心雕龙』，即为此意。

### 写作规范

写作规范即指标题、文本、段落、中英文、标点符号、参考链接等等格式规范。吾常观各大博客，文章格式杂乱者不在少数，中英文切换不留空格、符号混用、多级标题随心所欲，笔走龙蛇，各自有文风。

> 「有研究显示，打字的时候不喜欢在中文和英文之间加空格的人，感情路都走得很辛苦，有七成的比例会在 34 岁的时候跟自己不爱的人结婚，而其余三成的人最后只能把遗产留给自己的猫。毕竟爱情跟书写都需要适时地留白。与大家共勉之。」——vinta/paranoid-auto-spacing

在写作过程中，咱主要参考的是以下两个规范，其一是写作规范，其二是格式规范，其三为排版规范，三篇规范各有杂述。

* [中文技术文档的写作规范](https://github.com/ruanyf/document-style-guide)
* [Markdown 编写规范](https://github.com/fex-team/styleguide/blob/master/markdown.md)
* [中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines)

遵循上述写作规范，日常博文写作更加如鱼得水。

### 写作工具

再推荐下咱当前所用的写作工具：[vscode](https://code.visualstudio.com/) + [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)

vscode 支持 Markdown 写作预览，是一个不错的文本编辑器，但类似开源软件不在少数，为何偏偏青睐 vscode，其重点是后面它独有的 markdownlint 扩展。

markdownlint 官方介绍：

> Markdown/CommonMark linting and style checking for Visual Studio Code.

顾名思义，markdownlint 是一个 Markdown 语法检测与修复的 vscode 小扩展。它能修复错误语法，规范写作风格，统一写作范式，是处女座或有洁癖作者的必备工具。正是因为这个扩展让咱放弃诸多如 typora 等知名工具。

该扩展提供 40 多种 Markdown 最佳写作规范来让写作更加轻松和愉悦。这里简要摘取 5 条写作规范：

* MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
* MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading\~\~
* MD003 heading-style/header-style - Heading style
* MD004 ul-style - Unordered list style
* MD005 list-indent - Inconsistent indentation for list items at the same level

该扩展的所有 Markdown 规范详见 [markdownlint/doc/Rules.md](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md)

Just enjoy it 😃!
