question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto-indent on line break

See original GitHub issue

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 <kbd>Enter</kbd>

Steps to reproduce:

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

Result:

  • New line starts flush against the LHS

Expected result:

  • New line is indented 4 spaces per previous line

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kazzkiqcommented, 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

1reaction
ShahinSorkhcommented, Dec 31, 2018

@kazzkiq Now you can close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I automatically indent on new lines?
The autoindent option will copy your current indentation when creating a new line. So if your current indentation level is 4 when you...
Read more >
Line Breaks And Auto-Indent In The Power BI DAX Formula Bar
Press the SHIFT and ENTER keys on the keyboard simultaneously to insert a line break in your DAX code when you are working...
Read more >
How to prevent VSCode auto add new line and indent?
When you are in VSC, go to... File > Preferences > Settings > Text Editor. Scroll down until you find: Auto Indent and...
Read more >
Adding a line break without applying indentation? : r/vim - Reddit
I wanted to simply add a new line at the beginning, without losing those spaces. But with vim if autoindent is on, simply...
Read more >
How to add a new line with the same indentation - vim
Adding set autoindent to your ~/.vimrc can do that for you automagically.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found