Code Monkey home page Code Monkey logo

Comments (5)

dsawardekar avatar dsawardekar commented on August 23, 2024

I made a pass at doing this here.

The change itself was easy, Adding a newline to node.compiled_output, but a lot of tests depend on the newline being present when comparing against compiled code. The test suite fails, but the compiler works fine and the output formatting is improved, as seen here.

I could add the newlines to the tests. But given the number of tests(~50) that do this equality test I felt it better to get your thoughts on this first.

https://github.com/dsawardekar/riml/tree/improve-output-formatting

from riml.

luke-gru avatar luke-gru commented on August 23, 2024

Hey, sorry for delayed reply. Busy week 😦

Yeah, definitely a small change, and I'm 👍 on it. Maybe there should be an option, like --readable for this though, as I was going to create a similar option for --keep-comments. This would allow for keeping the fold markers, modelines, etc...

Not sure if --readable should be the default option, but if you find yourself digging into the outputted VimL often then I may as well make it the default.

I'd like your thoughts on if you think this should be default behavior.

Thanks!

from riml.

dsawardekar avatar dsawardekar commented on August 23, 2024

I haven't needed to drop into Viml too much, thanks to Riml! But it's useful when doing some meta programming to figure out the code generated.

The --readable sounds right to me, and I agree it should be default. --keep-comments is pretty good too.

While we are on the subject of comments, would it be a difficult change to add support for a different comment marker like #? Viml use of quote as the comment marker makes the syntax files regex a lot more complex, and messes up the syntax highlighting often...

from riml.

luke-gru avatar luke-gru commented on August 23, 2024

Blank lines after function definitions is the new default in 0.3.2. This can be turned off using the --condensed flag. My first go at --keep-comments failed, because preserving inline comments after code is actually pretty hard the way everything is implemented now. Keeping comments that are on their own lines should be easy enough. Anyway, I'm marking this as done, and I'll add another ticket so I don't forget to eventually come back to the comment stuff. As it stands, I think better error messages are probably a priority over keeping comments in the compiled files.

Thanks 😄

from riml.

dsawardekar avatar dsawardekar commented on August 23, 2024

+1 For better error messages!

from riml.

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.