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

Fails silently with Rewrap #16

Open
karlhorky opened this issue Sep 29, 2024 · 2 comments
Open

Fails silently with Rewrap #16

karlhorky opened this issue Sep 29, 2024 · 2 comments

Comments

@karlhorky
Copy link

karlhorky commented Sep 29, 2024

Hi @JannisX11, thanks for the amazing extension! Super helpful.

I am trying to use this while Rewrap is enabled with "rewrap.onSave": true.

When I save the file (manual save, not an auto-save on loss of focus), Rewrap tries to wrap short lines onto the same line, causing chaos in the file for Batch Rename, which fails silently (no error message or easy way to debug).

Would there be a way to enable usage of Batch Rename with Rewrap using this setting?

My current workaround is to disable Rewrap and then re-enable it every time that I use Batch Rename, but I would like to avoid this extra friction if possible.

Eg.

  1. I could imagine a setting that would apply Batch Rename changes when the editor tab containing the file names is only closed, instead of manually saved. Then I could just close the tab and Rewrap would not trigger.
  2. Or if there were a way to communicate to Rewrap that this particular file type should not be wrapped, that also seems like a possible solution.
@JannisX11
Copy link
Owner

You should be able to use per language settings to only enable rewrap on file types where you need it, or to disable it on txt files, which is what batch rename uses.

@karlhorky
Copy link
Author

karlhorky commented Sep 29, 2024

That sounds reasonable.

However, I use Rewrap on text files sometimes... 🤔

Would Batch Rename be open to using a different format? Eg. maybe some unrecognizable proprietary format like BatchRename file format, to eliminate possible conflicts with other tooling that deals with Plain Text files...

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