plugin for CudaText.
gives highlighting of indentation levels. by default, highlights only 4 indentation
levels in different background colors, next levels are colored in loop.
detects indentation level from editor setting "tab_size".
if some indentation is incorrect (e.g. 5-7 chars with "tab_size":4), then
it's highlighted in special color.
plugin has config file, to open it: "Options / Settings-plugins / Colored Indent / Config".
- "lexers": ","-separated lexers, for which plugin is active.
- "color_set": ","-separated list of syntax-theme elements, from which background colors are taken.
- "color_error": syntax-theme element, from which error color is taken.
- "max_lines": maximal count of lines in document, when plugin is active.
plugin works on events: after file opened; after text is changed and short pause is passed.
author: Alexey (CudaText)
plugin Colored Indent
Colored Indent plugin in just tab rows
Hello,
when using colored intent plugin,the lines with just tabs will not be colored.(line 157 and 158 below)
Thanks!
when using colored intent plugin,the lines with just tabs will not be colored.(line 157 and 158 below)
Thanks!
Last edited by SamC on 30.01.2024 05:15, edited 1 time in total.
-
main Alexey
- Posts: 3004
- Joined: 25.08.2021 18:15
Re: colored intent plugin in just tab rows
yes, lines with just spaces and with just tabs. it is by design, ok IMHO.
Re: colored intent plugin in just tab rows
"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.
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: 3004
- Joined: 25.08.2021 18:15
Re: colored intent plugin in just tab rows
it is plugin code. change it here, in "def get_indent":
please name the topic better: Colored Indent plugin.
Code: Select all
def get_indent(s):
for i in range(len(s)):
if s[i] not in (' ', '\t'):
return s[:i]
return sRe: Colored Indent plugin in just tab rows
Get it, thanks!
-
main Alexey
- Posts: 3004
- Joined: 25.08.2021 18:15
Re: Colored Indent plugin in just tab rows
I added new option: "only_space".