calon / txt Goto Github PK
View Code? Open in Web Editor NEW用于中文书写的 Vim 语法高亮文件,支持常见序号和不太复杂的配对标点符号,建议搭配 ir_black 主题使用。
用于中文书写的 Vim 语法高亮文件,支持常见序号和不太复杂的配对标点符号,建议搭配 ir_black 主题使用。
因为vim默设将txt识别为text格式,所以我将此插件重命名为text.vim放在syntax/目录下使用。
在linux下使用良好。
但同样的vimrc和文件拷到 windows7/10 下面后,gvim关联txt格式,然后双击打开文件时,会弹出错误信息。
点击确认按钮后仍然能为txt着色。
我排查问题,只将 txt.vim 放在 syntax/目录下,然后在 vimrc 中添加一条命令如下
autocmd BufEnter * if &filetype == "text" | setlocal ft=txt | endif
这样就不会报错。
请问这是为什么呢?
因为错误信息太长,可以在 https://github.com/tankb52/txt/blob/master/text_error.txt 这里查看。
前186行为 cp936格式,186行以后为utf8格式。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.