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

Auto-indent on line break #62

Closed
lol768 opened this issue May 4, 2018 · 7 comments
Closed

Auto-indent on line break #62

lol768 opened this issue May 4, 2018 · 7 comments

Comments

@lol768
Copy link

lol768 commented May 4, 2018

Unsure if there's another issue open for this, but it'd be nice if CodeFlask automatically added the same number of indenting characters (tabs/spaces) based on the previous line when hitting Enter

Steps to reproduce:

  • Enter the following text:
function foo() {
    // cursor is here: █ 
  • Hit Enter

Result:

  • New line starts flush against the LHS

Expected result:

  • New line is indented 4 spaces per previous line
@kazzkiq
Copy link
Owner

kazzkiq commented May 4, 2018

I'm implementing it on the new version of CodeFlask. This is actually one of the last things missing before I publish the new version.

You can check the current status (aka. me failing miserably to make it work) here: https://github.com/kazzkiq/CodeFlask.js/blob/1.0/src/codeflask.js#L212

@lol768
Copy link
Author

lol768 commented May 4, 2018

Awesome to hear!
What are the challenges associated with it?

@simonwidjaja
Copy link

Any news on this?

@kazzkiq
Copy link
Owner

kazzkiq commented Nov 23, 2018

Yes. It didn't worked as expected and is in the "TODO" list.

You can check the relevant code here:
https://github.com/kazzkiq/CodeFlask/blob/master/src/codeflask.js#L235-L264

@ShahinSorkh
Copy link
Contributor

@kazzkiq Now you can close this issue.

@kazzkiq kazzkiq closed this as completed Dec 31, 2018
@lol768
Copy link
Author

lol768 commented Jan 1, 2019

Is this supposed to work on https://kazzkiq.github.io/CodeFlask/?

@kazzkiq
Copy link
Owner

kazzkiq commented Jan 1, 2019

@lol768 Yes.

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

No branches or pull requests

4 participants