Colored Indent plugin in just tab rows

Plugins for SynWrite and CudaText...
Post Reply
SamC
Posts: 208
Joined: 12.08.2023 00:49

Colored Indent plugin in just tab rows

Post by SamC »

Hello,
when using colored intent plugin,the lines with just tabs will not be colored.(line 157 and 158 below)
Thanks!
Snipaste_2024-01-30_09-15-47.png
Last edited by SamC on 30.01.2024 05:15, edited 1 time in total.
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Re: colored intent plugin in just tab rows

Post by main Alexey »

yes, lines with just spaces and with just tabs. it is by design, ok IMHO.
SamC
Posts: 208
Joined: 12.08.2023 00:49

Re: colored intent plugin in just tab rows

Post by SamC »

"By design" means it can't be adjusted by plugin code and built-in cuda api?
I’ve see the plugin code,it seems no special code to clear the color of lines with just spaces and with just tabs.
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Re: colored intent plugin in just tab rows

Post by main Alexey »

it is plugin code. change it here, in "def get_indent":

Code: Select all

def get_indent(s):
    for i in range(len(s)):
        if s[i] not in (' ', '\t'):
            return s[:i]
    return s
please name the topic better: Colored Indent plugin.
SamC
Posts: 208
Joined: 12.08.2023 00:49

Re: Colored Indent plugin in just tab rows

Post by SamC »

Get it, thanks!
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Re: Colored Indent plugin in just tab rows

Post by main Alexey »

I added new option: "only_space".
Post Reply