-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CLI: REPL: <TAB> characters in multi-line mode should be converted to 2 spaces #3913
Comments
We could just disable autocompletion in multiline mode. |
Sounds wise. |
I'm surprised this hasn't been brought up before. Am I the only one that uses tabs? 😆 Thanks for the replies, though. 👍 |
@aleclarson Nearly all CoffeeScript is written with 2-space indentation. It's just part of the culture. |
I'm beginning to work with coffeescript and would like to contribute to this topic. I'm learning coffeescript and accept per language documentation that it is whitespace agnostic as long as a person maintains either tab or space usage consistently. It's in the spec. So I get nodejs and coffee running (windows command line). Start working, practicing, etc. A while after starting I realize I want multiline REPL so I search some more to find CTRL-V is the answer. Ok..great...got that solved...back to the sample tutorials.... I start a multiline; write some code; press enter; get to line 2; press 'tab' and "What's going on? It's supposed to take tabs. " I know enough of Unix to quickly grasp it's doing an autocomplete. We all know the arguments for and against tabs as a personal choice, but
So there are my thoughts and reasoning as a brand new user coming over here and seeing the software from scratch. The autocomplete wasn't expected. It didn't seem to fit. I didn't know what to do with it. And it didn't help me out. Maybe I'm wrong and it becomes more valuable in future, but I don't see the value for now. |
PS comment: I never did figure out how to be able to enter a tab in multiline. Maybe there is another key combination which inserts it instead. |
PPS: Not allowing tabs also means that any code I start writing now (as I learn this and start building up an ongoing mass of work) will be forced to be in space-indent notation if I intend to ever even SLIGHTLY enter or test snippets by pasting it in once in a while. Even if I have a larger block of code that I load from a full file it only takes a need to paste 0.01% of the time before I'm essentially forced to choose spaces over tabs (or else everytime I want to do an emergency REPL of something I, again, have to convert.) |
Two considerations for a fix:
|
I use tabs instead of spaces in my code. I cannot test snippets of my code if there is indentation, because the multi-line mode reads tabs as if you're pressing the tab key in the terminal; which shows you autocompletion (normally all variables in the global scope because the indentation is always at the beginning of each line).
Is it possible to convert the tabs to double-spaces when I press ⌘+V in multi-line mode?
Thanks.
The text was updated successfully, but these errors were encountered: