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

Fix autocommands, allow undo indent #1260

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

champignoom
Copy link
Contributor

@champignoom champignoom commented Jan 2, 2024

This PR allows undoing the indenting upon leaving insert mode.

For example:

* heading
        type something with custom indent here

After typing the last line with cursor just after "here", press <Esc>, then it becomes

* heading
  type something with custom indent here

Sometimes this is not wanted. Now the indenting can be reverted by u to

* heading
        type something with custom indent here

@champignoom champignoom marked this pull request as draft January 2, 2024 17:27
@champignoom champignoom marked this pull request as ready for review January 2, 2024 17:54
@champignoom
Copy link
Contributor Author

I don't understand how fd6d0bf got merged.

@max397574
Copy link
Contributor

I don't understand how fd6d0bf got merged.

there are like two different commits pointing to that pr
perhaps there were some rebasing mistakes

@champignoom champignoom force-pushed the patch-indentkeys-esc-undo branch 2 times, most recently from 9d1c70e to c60151a Compare January 3, 2024 06:59
@champignoom champignoom marked this pull request as draft January 3, 2024 09:35
@vhyrro
Copy link
Member

vhyrro commented Jan 6, 2024

Yeeah it seems like a rebase messed something up. The PR looks good to me! If there's nothing else to do you can undraft it and I'm fine to merge.

@champignoom champignoom marked this pull request as ready for review January 7, 2024 12:07
@champignoom
Copy link
Contributor Author

I might have encountered a problem of code blocks but I can't reproduce nor remember it anymore, so yes, it's mergeable.

@champignoom champignoom marked this pull request as draft January 17, 2024 10:55
@champignoom
Copy link
Contributor Author

I re-encountered the problem:

     @code rust
     #[a="
"]
     @end

The line "] has negative indentation relative to the code block.

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

Successfully merging this pull request may close these issues.

None yet

3 participants