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

Feature Request: Please Add Edit/Wrap Paragraph Command #1483

Closed
ghost opened this issue Feb 18, 2021 · 16 comments
Closed

Feature Request: Please Add Edit/Wrap Paragraph Command #1483

ghost opened this issue Feb 18, 2021 · 16 comments

Comments

@ghost
Copy link

ghost commented Feb 18, 2021

Describe the feature and the current behavior/state

This is a command commonly found in text editors, including vim/emacs/sublime:
fill

Sometimes called "Wrap Paragraph", or sometimes "Fill Paragraph".
It takes a selection and breaks the text into lines at word boundaries, so
that lines do not exceed N characters (often N=80 for historical reasons
predating wide screens).

Who will benefit with this feature?

Those of us used to it from using other editors. :)

@dbitouze
Copy link
Contributor

Already asked, but not as an issue per se. I strongly support this feature!

@sunderme
Copy link
Member

this begs to be solved by script ... so if someone wants to step forward ...

@ghost
Copy link
Author

ghost commented Feb 18, 2021

this begs to be solved by script ... so if someone wants to step forward ...

Challenge Accepted.

@foreachthing
Copy link

Please add the opposite (un-paragraph) as well ;-)
I don't like those 80-char-width-pars.
Thanks!

@sunderme
Copy link
Member

you can put a pull-request to texstudio-macro which allows "easy" download for all users

@benibela
Copy link
Member

Isn't that just Idefix / Hard Line Break?

@sunderme
Copy link
Member

indeed.
What exactly does "smart scoping" do ?

@benibela
Copy link
Member

It chooses the paragraph or something. Without smart scoping, it only wraps the selected text or, if nothing is selected, the entire document

@dbitouze
Copy link
Contributor

you can put a pull-request to texstudio-macro which allows "easy" download for all users

BTW, isn't the purpose of the TXS-macro "Format TeX source" that may be found in Macros→Edit Macros...→Browse→automatedTextmanipulation→formatTeXsource.txsMacro? Its description is: Formats TeX source code by applying proper indentation, compressing multiple whitespace characters into one, etc.

@dbitouze
Copy link
Contributor

you can put a pull-request to texstudio-macro which allows "easy" download for all users

IMO, it is a really useful feature and should be directly available in TXS, not as macro.

@sunderme
Copy link
Member

the wrapping is already in txs, only nobody is aware of it. That is a reason why I am hesitant simply to add more and more specialized functions, especially if the result is a matter of personal taste, here "proper indentation"

@ghost
Copy link
Author

ghost commented Feb 19, 2021

Isn't that just Idefix / Hard Line Break?

It totally is. I didn't know that command existed and apparently I'm not the only one. It's a shame about the mandatory click-through dialog, but it does do exactly this.

@ghost ghost closed this as completed Feb 19, 2021
@ghost
Copy link
Author

ghost commented Feb 24, 2021

@foreachthing, I updated the script to toggle between wrap/unwrap.

@benibela
Copy link
Member

It's a shame about the mandatory click-through dialog, but it does do exactly this.

That is what Repeat Hard Line Break is for

@ghost
Copy link
Author

ghost commented Feb 25, 2021

It's a shame about the mandatory click-through dialog, but it does do exactly this.

That is what Repeat Hard Line Break is for

Thanks, good to know.

Personally, everything about how this was implemented is confusing. But it's available out of the box, no question.

@foreachthing
Copy link

I updated the script to toggle between wrap/unwrap.

@JonathanBrockhausen, this is AWESOME! 😀 Thank you so much!!

This issue was closed.
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

4 participants