Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any support syntax styling (indent, tab, etc..) from .editorconfig ? #55

Closed
DanielTimLee opened this issue May 4, 2018 · 3 comments
Closed
Labels
question Further information is requested

Comments

@DanielTimLee
Copy link

Well, bat is not really an 'editor',

but It'll be really nice if bat supports syntax styling with .editorconfig.

@DanielTimLee DanielTimLee changed the title Any support for syntax style (indent, tab, etc..) from .editorconfig ? Any support syntax styling (indent, tab, etc..) from .editorconfig ? May 4, 2018
@sharkdp
Copy link
Owner

sharkdp commented May 4, 2018

I don't quite understand. Which of the .editorconfig settings would/should really have an impact on the output format of bat?

If it's only about tabs, I'm not sure re-rendering tab-characters as n spaces would really be a good idea. I would somehow like to keep the output of bat exactly the same as the file contents (except for highlighting).

@sharkdp sharkdp added the question Further information is requested label May 4, 2018
@DanielTimLee
Copy link
Author

Oh, I see. Didn't realize it was trying to keep same file contents.

keep the output of bat exactly the same as the file contents (except for highlighting).

I was just wondering if bat could reformat or reindent minimized js files.

Cause, minimized js files are pretty annoying to read.
One has to open that file and re-indent or re-format file to make readable of.

Or someone like to make indent 4 -> 2 to make the code more compact.
(In my case, using bat on split tmux pane is a little bit uncomfortable. bat result is pretty huge.)

@sharkdp
Copy link
Owner

sharkdp commented May 6, 2018

I was just wondering if bat could reformat or reindent minimized js files.

I'm afraid that this is out of scope for bat. This would better be left to an external tool which could still be used via reformat-js test.min.js | bat -l javascript.

Cause, minimized js files are pretty annoying to read.

... because they were never meant to be read by a human? 😄

Or someone like to make indent 4 -> 2 to make the code more compact.

This would be a re-write of the file and not something that would be configurable via .editorconfig.

I'm going to close this ticket, but feel free to comment here or open a new ticket with a specific request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants