advice2020 left a comment (geany/geany-plugins#1527) ### TOOL 1 - CODE FOLD BASED (Requires script for "move up" and script for "move down")
`XML EXAMPLE` Would be for any coding language but just for an easy example will use xml file. Say file contains 3 tags/blobs of code, each recognized as a code fold within Geany. ``` <ONE> Apple </ONE> ``` ``` <TWO> Orange </TWO> ``` ``` <THREE> Banana </THREE> ``` ---------------------------------------------------- `ACTION 1 - CARET BASED` Say you place caret in any line within code fold ONE Script would recognize caret is in code fold ONE, then if apply "move down" script it would move that code fold ONE down, placing it below TWO, which would look like.... ``` TWO ONE THREE ``` The caret would also remain in code fold ONE, allowing user to apply "move down" script again, which would then move code fold ONE down again ``` TWO THREE ONE ``` ---------------------------------------------------- `ACTION 2 - SELECTION BASED` Selection based would be very useful because it would allow multiple code folds to be moved up/down at the same time. If this is too complicated to achieve then do not need to provide. Could just use ACTION 1 which would only allow 1 code fold at a time to be moved up/down but still useful. In the XML EXAMPLE, say you create selection of the following lines ``` Apple </ONE> <TWO> ``` Script would view the beginning and end of selection as "two carets" Any code fold that the "beginning caret" is in, and any code fold that the "end caret" is in (and all code folds in between these "two carets") would be moved up/down similar to ACTION 1, but as a "group" of code folds instead. So if applied "move down" action, code folds ONE and TWO would move below THREE, so would look like.... ``` THREE ONE TWO ``` -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1527#issuecomment-3623818235 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany-plugins/issues/1527/[email protected]>
