In PyCharm I use Ctrl Shift + and Ctrl Shift - to unfold or fold everything and Ctrl Alt + and Ctrl Alt - to unfold or fold the region containing the caret.
The most important is Ctrl Shift - which allows to hide all the code with the exception of the top level statements and declarations, giving an outline of the classes.
I would really really really love to have these shortcuts in the Anvil editor.
neovim… I will give it a try, it will be like traveling back in time for me.
I worked for a few years in vi, in the late eighties, before vim or linux even existed.
If you ask me what key corresponds to what command, I’m not going to be able to answer, I forgot everything.
Today, when I put my hands on a vim editor I don’t know what to do, but my fingers automagically know what to do. And I’m there, amazed, looking at my hands able to yank and paste chunks of code and get the job done.
Then, when I’m done, you ask me again, and I still don’t remember how to do what I have just done.
The Firenvim browser plugin for neovim reminds of an Excel VBA macro that I made that starts when I press Ctrl+Shift+Alt+E. The macro saves the content of the active cell to a text file, starts a text editor with that file and starts polling the modification time of the text file.
When the text file is saved the macro reads the content and replaces the cell text.
This little VBA macro allows me to edit and format large formulas, json objects or various scripts that I often stash inside Excel cells and are very difficult to manage with the limited cell editing native in Excel.
It looks like this plugin does something similar: saves the content of a TextArea to a text file and runs the nvim text editor installed on the computer. It does it nicely, embedded in the browser’s TextArea rather than in the editor UI, but the concept is similar.
Doing this in Excel + VBA is easy because I have full access to the cell’s content, the file system and the executables, while in a browser is more difficult because of the browser’s security constraints.
At this point, rather than wasting more hours trying to configure a bunch of tools so they talk to each other in Windows and finally being able to work with an editor I’m not familiar with, I would rather create my own jerry rigged plugin that selects the TextArea text, copies and pastes it in PyCharm and viceversa.
Or just use the good old pull / edit / push workflow with PyCharm.
Or wait for the fold/unfold shortcuts to be available in the Anvil editor.
Or wait for a PyCharm plugin that allows to edit the code, while keeping the web interface for the form editor. So I would have multiple editors open on the same app at the same time, yay!!
Wow, that sounds like a lot of work. I haven’t used Windows for more than a decade, so I don’t have much to offer, I’m afraid (and you’ve reminded me why that’s the case)!
Currently you can do Ctrl-Shift-[ (Cmd-Alt-[ on macOS): foldCode. Ctrl-Shift-] (Cmd-Alt-] on macOS): unfoldCode. Ctrl-Alt-[: foldAll. Ctrl-Alt-]: unfoldAll.
whats the Alt key on a mac keyboard ? ( google said the Option key) that doesn’t work in either classic of beta editor for me
on Mac alt is the option key.
You’ll need to be on the first line of the code block for code fold to work. And fold all should just work. (Works for me on Mac)
I removed the [Done] from the subject because the Ctrl-Alt-[ is useless as is. It doesn’t really fold all, it only folds the top level, not the lower levels.
This makes it impossible to fold all, then unfold one class and see the members of the class. If you unfold the class, all its members are unfolded and you are at the starting point, wasting your time scrolling up and down.