Fold all lines which are not found in Find dialog
Fold all lines which are not found in Find dialog
plugin or feature?
1. how to folding not match, like notepad 3 2. when folding , how to show whole line instead of [...] short line, also ,like notepad3
ths for reply.
1. how to folding not match, like notepad 3 2. when folding , how to show whole line instead of [...] short line, also ,like notepad3
ths for reply.
-
- Posts: 2245
- Joined: 25.08.2021 18:15
-
- Posts: 2245
- Joined: 25.08.2021 18:15
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Checked the API. found Editor.folding() API. https://wiki.freepascal.org/CudaText_API#Editor.folding
it can do FOLDING_ADD (add fold range - you can create it for any lines). and FOLDING_FOLD (fold any range). so plugin is possible here. plugin can fold all lines except the lines with carets. so user puts carets (via Find dialog), then calls the plugin.
it can do FOLDING_ADD (add fold range - you can create it for any lines). and FOLDING_FOLD (fold any range). so plugin is possible here. plugin can fold all lines except the lines with carets. so user puts carets (via Find dialog), then calls the plugin.
-
- Posts: 2245
- Joined: 25.08.2021 18:15
I wrote this plugin: it's in the zip file here,
https://github.com/kvichans/cuda_ext/issues/203
Open zip file in CudaText to install it.
It adds menu item "Plugins / Fold lines w/o carets".
Later it will be integrated to CudaExt.
Please test.
https://github.com/kvichans/cuda_ext/issues/203
Open zip file in CudaText to install it.
It adds menu item "Plugins / Fold lines w/o carets".
Later it will be integrated to CudaExt.
Please test.
it is not perfect, but yes, that 's the way that i want
1. fold should be start on the line that is found , and stop on the line that is found
the lines that i marked should be fold
2. all lines which are found should be shown, but now, only the line i choose is shown 3. so i chose all lines which are found, then run , that is more like that i want, except the line before and the line after(marked at more.png) 4. can fold be revent when i run it again?
1. fold should be start on the line that is found , and stop on the line that is found
the lines that i marked should be fold
2. all lines which are found should be shown, but now, only the line i choose is shown 3. so i chose all lines which are found, then run , that is more like that i want, except the line before and the line after(marked at more.png) 4. can fold be revent when i run it again?
-
- Posts: 2245
- Joined: 25.08.2021 18:15
-
- Posts: 2245
- Joined: 25.08.2021 18:15
what do you mean "only the line I choose"? I called [...]/Select_all, so editor puts multi-carets on 'tab_spaces', I don't need to choose anything.all lines which are found should be shown, but now, only the line i choose is shown
maybe you had _folded_ ranges before calling my new plugin?
you mean 'reverted'? you can right-click the gutter-fold-column, choose 'Unfold all'. ok?can fold be revent when i run it again?