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

Continue lists with M-RET #107

Open
quazgar opened this issue May 24, 2023 · 1 comment
Open

Continue lists with M-RET #107

quazgar opened this issue May 24, 2023 · 1 comment

Comments

@quazgar
Copy link

quazgar commented May 24, 2023

IIRC earlier versions of yaml-mode had a key binding to M-RET to insert a new line, indent and continue with - if the previous line was also a dash-denoted sequence.

So

foo:
  - bar

would, after pressing M-RET on the end of the last line, become

foo:
  - bar
  - 

If my memory is correct, this should be reintroduced. If not, then this would be a nice feature.

As a workaround, I currently use orgalist-mode which does more or less the same, with (add-hook 'yaml-mode-hook 'orgalist-mode).

@wasamasa
Copy link
Collaborator

wasamasa commented Jun 4, 2023

I haven't found such functionality in the mode, so it would need to be a new feature. If you have found it in an earlier revision, please point me to it.

Personally, I'm fine with an extra minor mode adding this because doing this properly (to react correctly depending on the context) would require better understanding of the YAML file than we currently have with fragile regex.

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