Giter Club home page Giter Club logo

Comments (1)

lifepillar avatar lifepillar commented on June 11, 2024

Thanks for the feedback! I've pushed a fix for those issues.

The problem with the parsing of highlight groups was names such as Bold and Italic, which were treated as keywords by Colortemplate. Consider this example:

Added none none                      
Bold  none none bold

As whitespace doesn't count (except that highlight group names must start at the beginning of a line), Colortemplate parses it as follows:

Added none none Bold

considering Bold a style attribute of Added. Then, it bails out because the following none is syntactically incorrect in that context.

I've fixed it by requiring style attributes to be all lowercase (the syntax highlighting already matched case-sensitively, but the parser did not). That fixes your particular problem, but since highlight group names are case-insensitive, in principle one might write a template like this:

Added none none                      
bold  none none bold

which cannot be parsed. But that is an edge case we can live with.

I think I'm over my head trying to succeed in this endeavor even if the tool worked flawlessly,

First, I hope that after the initial stumbling, the tool will work flawlessly :-) Please feel free to provide more feedback if you encounter more issues: v3 is still in beta stage.

Then, a suggestion: if you want to import a colorscheme, start Vim with vim --clean to avoid cluttering the import with unnecessary highglight group definitions (although you may also delete them after the import).

from vim-colortemplate.

Related Issues (20)

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.