rootkiter / vimhome Goto Github PK
View Code? Open in Web Editor NEWnew vim config home.
new vim config home.
在写代码的时候,会经常遇到数据结构内元素无法对齐的情况,让代码看起来有点乱。。需要一个可以格式化常用结构的插件。比如,列表,元组,字典,等常见数据结构的内部展示,一个预估样例为:
将
["12cbf5e90d92806bcdc2260527e85fa0","0xc67c","arm","32","le"],
["4b713ac4ca6646c7941e609e770f8dc8","0x40239e","x8664","64","le"],
["0b5e05bd8c4acd10b570839ae5dcfae7","0x1bdd4","arm","32","le"],
格式化为
["12cbf5e90d92806bcdc2260527e85fa0","0xc67c" ,"arm" ,"32","le"],
["4b713ac4ca6646c7941e609e770f8dc8","0x40239e","x8664","64","le"],
["0b5e05bd8c4acd10b570839ae5dcfae7","0x1bdd4" ,"arm" ,"32","le"],
实现逻辑:分析多个选中的行中,每个成员的字符长度,并以列为单位,选择最长的元素作为当前列的长度。每一列长度确定后,按照列长度分别格式化每个行。
暂定:元素间隔用 ,[]{}() 等界定符 作为区分依据,以便保证元素类型可以兼容数字和字串。如有其他更好的实现思路也可以一并加入考量。
暂定: 先不考虑元素嵌套的每行元素个数不同的情况,以相同元素个数为默认选项。
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.