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

devil-key newline-and-indent #28

Open
stevemolitor opened this issue Jun 24, 2024 · 1 comment
Open

devil-key newline-and-indent #28

stevemolitor opened this issue Jun 24, 2024 · 1 comment

Comments

@stevemolitor
Copy link

stevemolitor commented Jun 24, 2024

Thanks for this package. I've only been using it for a day and my fingers thank you already!

EDIT simplified question: What's the most efficient way to handle inserting a comma and then invoking newline-and-indent ("C-j") with devil-mode? Typing , , , j works but is a lot to type.

I'm thing of scenarios where one is creating a list with one item per line, indented, with comma at the end of each item:

const myList = [
    "one",
    "two",
    "three",
    // ...
@morganwillcock
Copy link

If you are using electric-indent-mode (which is enabled in Emacs by default unless your configuration turns it off or the major-mode opts out of using it) you just have to type , RET.

(I know this doesn't directly answer the question, but if the major-mode applies indentation correctly then the path of least resistance is just to let the major-mode take over. This way the longer key sequence would be for opting out of having indentation applied rather than opting into it.)

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

2 participants