Comments (5)
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.
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.
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.
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.
+1 For better error messages!
from riml.
Related Issues (20)
- Cache riml_includes between compile_files HOT 11
- Syntax error with dot access of "append" property on argument HOT 2
- Functions starting with uppercase letter HOT 2
- Make 1.8.7 compatible HOT 1
- smarter `riml_include` re-orders inclusions based off dependency graph for classes HOT 10
- add `riml_import` for importing classes. Once imported, you can use them without 'undefined class' errors. HOT 2
- Cache SID result HOT 2
- Minimum and Recommended version of Vim for `riml` generated code HOT 4
- `for` statement in global scope pollutes global variables HOT 3
- Functions that handle range HOT 2
- Upgrading to riml 0.3.7 doesn't pickup some classes in path HOT 4
- class method name generation error HOT 6
- exception when calling method on a list item in one statement HOT 13
- bug in boolean assignment
- calling self method with splat args fails
- Calling super in a class without extending a parent class HOT 1
- Strings with interpolation don't work with escaped single quotes.
- The pyeval function is not treated as a system function
- Viml generated by Riml is incompatible with Vim p260 or higher HOT 3
- Variables inside function should compile to local to function scope
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riml.