Anvil IDE: wrap long lines

Is there a way to wrap long lines in the editor window?
If not, it would a good feature to add.

No, you can’t wrap lines in the editor, and I have never seen a code editor that wraps lines of code, because in Python indentation matters and understanding wrapped lines would be a nightmare.

But you can click these two buttons to use both the left and right sides of the screen:

image

image

1 Like

Thanks, Stefano.
I found all the ways to get more screen space for the editor already :slight_smile:
And I completely agree about Python indentation.
But sometimes I am stuck with a small porthole, especially while editing custom HTML. Guess, I just have to get used to it.

If you feel like taking up to the challenge, you could try setting up your environment to use some browser extension and do pretty cool things with it. :slight_smile:

I’m planning to try again soon, but I have tried and given up once. I work on Windows and…

1 Like

I run the Python LSP Server on my local machine with its Black Plugin for code formatting. That’s all hooked into my local editor, neovim, via its built in LSP support.

From within the IDE, I swap to neovim using CTRL-E and then, from within neovim, I have SPACE-F mapped to format my code using black.

Here it is in action:

black

1 Like

Yeah, came here to post info about Black.
+1 on that, it works for lots of editors and is very customizable despite its reputation for be uncompromising. (I always use --safe, change my max line length, etc.) Thanks @owen.campbell