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

Open Folds by shifting code #66

Open
juridiener opened this issue Aug 15, 2022 · 12 comments
Open

Open Folds by shifting code #66

juridiener opened this issue Aug 15, 2022 · 12 comments
Labels
enhancement New feature or request

Comments

@juridiener
Copy link

Neovim version (nvim -v | head -n1)

NVIM 7.0

Operating system/version

macOS

How to reproduce the issue

Screen.Recording.2022-08-15.at.10.20.52.mov

Expected behavior

Does not open fold.

Actual behavior

Open folds by shifting code left or right.

@juridiener juridiener added the bug Something isn't working label Aug 15, 2022
@kevinhwang91

This comment was marked as outdated.

@juridiener

This comment was marked as outdated.

@kevinhwang91

This comment was marked as outdated.

@juridiener

This comment was marked as outdated.

@kevinhwang91
Copy link
Owner

You have edited the text in the folding range, and it must be opened. It's Vim behavior.

I suggest you enhance your < and >. Detect fold whether is closed and then close the selection again.

@kevinhwang91 kevinhwang91 added enhancement New feature or request and removed bug Something isn't working labels Aug 15, 2022
@kevinhwang91 kevinhwang91 reopened this Aug 15, 2022
@juridiener
Copy link
Author

How i would do it? Sorry I have no experience with neovim and how to write custom functions.

@kevinhwang91
Copy link
Owner

maybe ufo can help, but I am not interesting for now. Set this feature as low priority.

@kevinhwang91
Copy link
Owner

How i would do it? Sorry I have no experience with neovim and how to write custom functions.

h foldclosed() h :foldc

@juridiener
Copy link
Author

okay, yeah it's only in my opinion important if you refactor large html code. That would help. For other cases it's a low important feature. Thanks for helping.

@kevinhwang91
Copy link
Owner

I suggest you use the format.

@juridiener
Copy link
Author

I noticed that behaviour as well when i copy or cut an div-tag and paste it in a different location the fold opens.
I hope you have some time to implement this. I don't know how difficult it is to implement this feature. But i would be really appreciate it, and it would be cover all cases for folding.

@kevinhwang91
Copy link
Owner

I noticed that behaviour as well when i copy or cut an div-tag and paste it in a different location the fold opens. I hope you have some time to implement this. I don't know how difficult it is to implement this feature. But i would be really appreciate it, and it would be cover all cases for folding.

It's difficult.

#60 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants