Skip to content

m1dsolo/chinese-formatter.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Chinese Formatter

一个用于美化中英文混排文本的 Neovim 插件

chinese_formatter_format

Table of Contents

Features

  • 自动调整中文和英文之间的空格。
  • 自动调整中文和数字之间的空格。

Installation

使用 lazy.nvim

return {
    "m1dsolo/chinese-formatter.nvim",
    lazy = true,
    ft = "markdown",
    opts = {
        auto_format_on_save = true,
        space_between_zh_and_en = true,
        space_between_zh_and_num = true,
        space_between_sym_and_link = true,
        space_between_sym_and_pic = true,
    },
}

Usage

当你设置 auto_format_on_savetrue 时, 这个插件自动会在你保存文件时自动格式化文本。

如果你想手动格式化文本,可以使用 ChineseFormatterFormat 命令。

Contributing

目前这个插件主要是为了解决个人写博客时遇到的排版问题,所以功能比较简单。

如果你有更好的想法或者建议,欢迎提 issue 或者 pr 。

License

MIT © m1dsolo

About

用于美化中英文混排文本的 Neovim 插件

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages