Comments (9)
You mean auto indenting and such? It doesn't have that option as it is highly difficult to tell what the scope is in the written text. It is like writing 1000 words without any punctuation and line break and trying to tell where the sentences end and paragraphs begin.
However:
- if you are talking about eliminating trailing spaces there is another sublime plugin for that https://github.com/SublimeText/TrailingSpaces
- If you are talking about converting tabs to spaces, then sublime can do that with a click.
- if you want to convert javascript to coffeescript, js2coffee can convert into a nicely formatted coffeescript.
Does this help? :)
from sublime-better-coffeescript.
hmm... how to say, for examply , currently I am using webstorm , when I write coffeescript code , it can format my coffeescript code by the command "Code--> Reformat Code"
then the code style of coffeescript will be better
for http://jsbeautifier.org/ it can change js to a better style , so I think maybe Coffeescript can also change to a better style
from sublime-better-coffeescript.
Well look at this answer on Stack Overflow:
CoffeeScript code that runs properly should already be "beautiful", since most of it's characteristics are not optional.
If it runs, then it has proper indentation. Any other beauties can be indentations with tabs, with 2 spaces, 4 spaces, additional line breaks after a line break (after functions maybe) and spaces after a comma if there is none.
If that is what you are looking for, just tidying up, then it is a rather simple enhancement to make. And I will write it down in the to-do list.
Is that what you are looking for? If not please tell me what webstorm does when you reformat code.
from sublime-better-coffeescript.
it is not long word to description, so I put screenshot of webstorm , hope it helps
http://www.jetbrains.com/webstorm/webhelp/coffeescript-support.html
from sublime-better-coffeescript.
Okay! Thank you for the screenshots!
I will add this feature!
from sublime-better-coffeescript.
May be useful:
https://github.com/derekchiang/Coffee-Formatter
https://github.com/derekchiang/Sublime-CoffeeScript-Formatter
from sublime-better-coffeescript.
Hi lavrton
I have tried above tools, but it does not work well.
from sublime-better-coffeescript.
I think what @enginespot is describing is the case where you copy and paste some coffeescript from another source which is indented with 2 spaces (or a 2 space tab) but you want 4 spaces (or a 4 space tab). I've run into this same issue many times, and it is annoying because Sublime Text's indentation options don't correct this.
However, the Indentation: Reindent Lines
command does attempt to apply the desired correction, and sometimes it succeeds.
from sublime-better-coffeescript.
I think there are only two ways to implement this.
- Someone should create own nodejs package for coffee formating. Then use it simular to coffeescript compiler with some configuration.
- Wait until some IDE project will publish free formating tool for coffeescripts.
from sublime-better-coffeescript.
Related Issues (20)
- comment on js file HOT 1
- How to pass in custom arguments to coffeescript binary
- Not working on Windows ? HOT 1
- Plugin Not Working HOT 1
- Cake task output
- Execute me, how to write a similar key binding for ES6 ${}
- Separate CSON from CoffeeScript
- Why is so slow the saving with SublimeText3 and Better-coffescript?
- This keeps popping when loading: rule scope:source.rust##anon_struct-tuple_0 has a scope name, but is unreachable HOT 1
- modules - import and export HOT 1
- Ability to use variable path for binDIR and envPATH HOT 2
- # -> #{} Code Snippet Not Limited to CoffeeScript Files
- Would it be possible to properly highlight regex literals?
- Please update for CS v2.0 HOT 3
- NEED NEW MAINTAINER - PLEASE POST HERE HOT 6
- [Feature request] Regular expressions highlights HOT 1
- if "class" appears in coffeescript code, e.g., class_name, subsequent lines are indented
- Nothing matching obj.method 'arg'
- Add support for Sublime Text 4 (build 4121) HOT 1
- Last character missing in auto-suggest in ST4 HOT 1
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 sublime-better-coffeescript.