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

Wrap text in console #330

Closed
matthewacarson opened this issue Feb 23, 2024 · 5 comments
Closed

Wrap text in console #330

matthewacarson opened this issue Feb 23, 2024 · 5 comments
Labels

Comments

@matthewacarson
Copy link

Hi. Is it possible to wrap the output in the console? Sometimes the output is very long and difficult to read. Thanks!

@Ekopalypse
Copy link
Contributor

The console is a Scintilla instance, as used by Npp itself.
You can access it via console.editor and set the wrapping mode with console.editor.setWrapMode.
See here for the description of the possible values available via the WRAP class.

@chcg chcg added the Question label Apr 28, 2024
@chcg
Copy link
Collaborator

chcg commented Apr 28, 2024

@matthewacarson Is enabling warpping via script command sufficient for your needs?

@alankilborn
Copy link

Is enabling wrapping via script command sufficient for your needs?

I should think so; with that everyone can easily customize it have exactly what they want; e.g., put the following in user startup.py:

console.editor.setWrapMode(WRAP.WORD)
console.editor.setWrapIndentMode(WRAPINDENTMODE.SAME)
console.editor.setWrapStartIndent(0)
console.editor.setWrapVisualFlags(WRAPVISUALFLAG.END)
console.editor.setWrapVisualFlagsLocation(WRAPVISUALLOCATION.END_BY_TEXT)

Change the parameters to the function as desired.

@matthewacarson
Copy link
Author

@matthewacarson Is enabling warpping via script command sufficient for your needs?

Yes!

Is enabling wrapping via script command sufficient for your needs?

I should think so; with that everyone can easily customize it have exactly what they want; e.g., put the following in user startup.py:

console.editor.setWrapMode(WRAP.WORD)
console.editor.setWrapIndentMode(WRAPINDENTMODE.SAME)
console.editor.setWrapStartIndent(0)
console.editor.setWrapVisualFlags(WRAPVISUALFLAG.END)
console.editor.setWrapVisualFlagsLocation(WRAPVISUALLOCATION.END_BY_TEXT)

Change the parameters to the function as desired.

That worked like a charm. Thanks!

@chcg chcg closed this as completed May 1, 2024
chcg added a commit that referenced this issue May 1, 2024
Added sample code from issue as script
@chcg
Copy link
Collaborator

chcg commented May 1, 2024

Added sample code from here as example script to repo

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

No branches or pull requests

4 participants