Code Monkey home page Code Monkey logo

txt.vim's Introduction

txt.vim

Forked from flniu/txt.vim

Special thanks to flniu

Make Vim more usable for viewing and editing plain text

Version: 0.2.2

Pros

  • The syntax file colors numbers, punctuation marks, links, quoted or bracketed text, Shell/C/C++ style comments, list items, TODOs/ERRORs, etc.
  • The ftplugin file includes some usable settings when viewing and editing text file.
  • The ftdetect file auto-detects text file according to file extension name.
  • Support CJK characters.

Fix log

0.2.1

  • Added special symbols such as "├、└、─" to highlight
  • Highlights caused by unclosed quotes and parentheses will end at the end of the line

0.2.2

  • Now the dash can be highlighted correctly
  • Fixed an error that resulted in incorrect matching range for paired symbols

Installation

cd ~/.vim/bundle
git clone https://github.com/ACOTSAE/txt.vim.git
" Add this line in vim-plug section:
Plug 'ACOTSAE/txt.vim.git'
" Then run commands in vim:
:so %
:PlugInstall

Bug

  • Due to syntax conflicts, highlighting of Em dash outside quotation marks will be different from Punctuation
  • Does not support recursive highlighting of paired punctuation marks such as quotation marks (I don't know how to write code)

Compatibility

After the Rainbow plugin is enabled, it will cause highlighting within parentheses to become invalid


txt.vim 中文说明

让Vim更加便于查看和编辑纯文本

版本: 0.2.2

功能介绍

  • syntax文件分色显示数字、标点符号、链接、引号或括号中的文字、Shell/C/C++风格的注释、列表项、TODOs/ERRORs、等等。
  • ftplugin文件包含一些查看和编辑纯文本文件的设置。
  • ftdetect文件根据扩展名自动识别纯文本文件。
  • 支持CJK字符集。

更新日志

0.2.1

  • 添加了形如“├、└、─”的制表符的高亮
  • 未闭合的引号和括号导致的高亮将会于行尾结束

0.2.2

  • 现在破折号可以正确高亮了
  • 修复了一个错误,会导致成对符号匹配范围错误

安装

cd ~/.vim/bundle
git clone https://github.com/ACOTSAE/txt.vim.git
" 在vim-plug配置节中添加这一行:
Plug 'ACOTSAE/txt.vim.git'
" 然后在vim中执行:
:so %
:PlugInstall

配置

"当行数过多时不显示行号,上限由g:line_number_limit定义
let g:disable_large_line_number = 0
"行数上限
let g:line_number_limit = 1000
"是否启用折行
let g:txt_enble_wrap = 1
"是否重定义折叠方式
let g:define_fold = 0
"OK检查
"按键映射为<leader><space>
let g:check_ok = 0

缺陷

  • 由于语法冲突,在引号外的破折号的高亮将不同于标点符号

  • 不支持引号等成对标点符号的递归高亮(不会写)

兼容性

  • Rainbaw插件启用后会到导致括号内高亮失效

🐶

TODO

  • 可配置选项

  • 迁移到text文件格式

  • 更高级的括号匹配

  • 15

  • 15

  • 55

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.