I can also make the work for unnumbered-list the same as for numbered list.
ie disable toggling of bullet char by tab-key.
so tab-key will only indent.
not sure.
plugin Markdown Editing
Re: markdown editing plugin list items
Maybe I Figure it out:main Alexey wrote: ↑28.01.2024 13:40 I can also make the work for unnumbered-list the same as for numbered list.
ie disable toggling of bullet char by tab-key.
so tab-key will only indent.
not sure.
For original idea,the tab character is used to make multi-level list,thus the tab key will generate intent and bullet/number at same time. If the list is numbered and tab key is pressed,it will generate the new sub-level numbered list, so the number is reset to "1. ".
In code, the indent size is get by the code below:
Code: Select all
indent_size=ed_self.get_prop(PROP_INDENT_SIZE)
Code: Select all
//Indentation for Indent/Unindent commands.
// N>0: indent is N spaces
// N<0: indent is abs(N) tabs
// N=0: indent is from options "tab_size" and "tab_spaces"
"indent_size": 0,
Code: Select all
indent_size=4
where to see the description of int key code?Ie,to kown 9 means tab key?
Thanks!
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Re: markdown editing plugin list items
>where to see the description of int key code?Ie,to kown 9 means tab key?
file py/cudatext_keys.py .
file py/cudatext_keys.py .
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Re: markdown editing plugin list items
fixed the plugin: "indent_size" value 0 and <0 is reading OK now.
small bug is left: after many presses of Tab after "- ", caret goes righter by several chars.
maybe you can fix this bug.
small bug is left: after many presses of Tab after "- ", caret goes righter by several chars.
maybe you can fix this bug.