Auto-indent on line break
See original GitHub issueUnsure 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:
- Created 5 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
@kazzkiq Now you can close this issue.