lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Le dim. 31 mai 2020 à 16:10, Enrico Colombini <erix@erix.it> a écrit :
Ah, OK, I misunderstood your posting. I am a minimalist and I prefer a
single editing pane, though :-)
 
Having two views of the same document is practical: it avoids constant navigation in the text for looking at related sections of code

You could have a small part showing a list of declarations, and the rest showing long implementations.

For editing data it allows seeing which elements are already defined (example table values) before referencing them in a lower part
For editing code, it allows checking places where a set of variables receives values, or a comment where there are specifications, before writing the code using it.
You don't forget something, you can see all in one place.

You can refactor some code or data more easily (it's easier to make cut-and-paste between the two views).

This is also needed in other applications (like spreadsheets to see the column heading at top, while navigating/scrolling the rows below): large data tables are easier to read or edit without mixing the columns.

So I frequently use the two views of the same document.

Note that even if Notepad++ also has a "line grouping" feature, which allows easier editing of large tables, editing some long flat lists will still require scrolling down, so it's not evident to see the top of the group and return to where we were (even if you can put a "blue buccle" mark on some lines and use a keyboard shortcut to return to the previous/next mark: remembering line numbers is less easy as it will vary for the bottom mark when you edit the top part)

The bad thing is that the two views in N++ are only presented side by side, not on top of each other. So for editing tables with many columns, it's not so easy.
Instead, what I do is to paste some "template" line as comments to repeat some parts of the top. Once the edit is done, and tested, I can remove these comment lines (and thanks, in Lua syntax, the comments may be multiline blocks if needed, without having to change the "helper" template code they embed)