Hello,
For '' and () pairs,if we selection certain text and type it, the paris will be added to surround the text.
Can I define new pairs like ** **(for markdown bold)to use as the ()pairs?
Thanks!
how to add ** mark surround to the selection
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Re: how to add ** mark surround to the selection
No, this should be coded as plugin. Plugin 'Markdown Editing' is a good place for this code.
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Re: how to add ** mark surround to the selection
oh, 'Markdown Editing' already has this code: on typing *, selection is surrounded with * and then with **.
the same - for _ chars.
the same - for _ chars.
Re: how to add ** mark surround to the selection
I find the description below in Markdown Editing plugin,but it doesn't work. The selection will be deleted and ** is then added. Somewhere to set an option?
"Plugin for CudaText.
Supports features during editing of Markdown documents.
Symbols *_` (asterisk, underscore, tick)
- auto-paired on typing
- if they are typed with selected text, selection is enclosed in symbols pair
- with pair of symbols, and BackSpace pressed - both symbols are deleted
- with pair of symbols, and Space pressed - right symbol is deleted"
"Plugin for CudaText.
Supports features during editing of Markdown documents.
Symbols *_` (asterisk, underscore, tick)
- auto-paired on typing
- if they are typed with selected text, selection is enclosed in symbols pair
- with pair of symbols, and BackSpace pressed - both symbols are deleted
- with pair of symbols, and Space pressed - right symbol is deleted"
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Re: how to add ** mark surround to the selection
1. do you see it on _clean_ CudaText (with only MarkdownEditing)?
2. surrounding works for me, even for multiline selection. my plugin config settings/plugins/plugins.ini has:
2. surrounding works for me, even for multiline selection. my plugin config settings/plugins/plugins.ini has:
Code: Select all
[markdown_editing]
list_indent_bullets=*+-
match_header_hashes=0
paired_chars="*~`
Re: how to add ** mark surround to the selection
Tried with clean CudaText,
with Markdown Editing plugin:** will be added and the selection is deleted.
without Markdown Editing plugin:* is added and the selection is deleted.
windows10 is used.
with Markdown Editing plugin:** will be added and the selection is deleted.
without Markdown Editing plugin:* is added and the selection is deleted.
windows10 is used.
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Re: how to add ** mark surround to the selection
Did you try to do it _with Markdown lexer active_ (and plugin installed)? seems no.
Re: how to add ** mark surround to the selection
Markdown lexer active is on.
I find it works with the * mark on main keyboard.
But didn't work for the * mark on keypad.(selection will be delete)
I find it works with the * mark on main keyboard.
But didn't work for the * mark on keypad.(selection will be delete)
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Re: how to add ** mark surround to the selection
reproduced it, thanks. fixed. plugin is updated. try again.
Re: how to add ** mark surround to the selection
It works now,Thanks!