Page 1 of 2
about markdown snippets and preview
Posted: 02.10.2023 09:51
by SamC
Hello,
I tried the markdown snippets in cudatext:
1.I'm not sure about what (selected will be inserted)mean. When use like "it" snippet, I selected some words first, but the mark overwrite the selection.
Maybe I misunderstand something?
2.The relative path is not based on the *.md file path, it seems it base on the path below? file:///C:/Users/Admin/AppData/Local/Temp/cuda_markdown_preview/
![alt-Text](.\3.png)
Re: about markdown snippets and preview
Posted: 02.10.2023 09:59
by main Alexey
>I'm not sure about what (selected will be inserted)mean
E.g. snippet 'it'.
If you type in text 'it' and press TAB, snippet will insert 2 *-chars: **. But if you select some block first, and call snippet from Plugins menu, snippet will surround the block with 2 *-chars.
Maybe '(selected will be inserted)' is blurry text in the snippet caption.
Re: about markdown snippets and preview
Posted: 02.10.2023 10:04
by main Alexey
The relative path is not based on the *.md file path, it seems it base on the path below? file:///C:/Users/Admin/AppData/Local/Temp/cuda_markdown_preview/
I did not understand. please write more detailed. what path, where, what snippet do you call?
Re: about markdown snippets and preview
Posted: 02.10.2023 10:19
by SamC
Sorry, this is not the snippet, it's the "markdown preview plugin", when preview markdown file, the relative path is not from the *.md file path.
Re: about markdown snippets and preview
Posted: 02.10.2023 10:20
by SamC
For the '(selected will be inserted)', now I konw it should be used in menu rather than type it.
But after using the snippet, the small up triangle mark still exist, tab button can't erase it too.
Re: about markdown snippets and preview
Posted: 02.10.2023 11:29
by main Alexey
The relative path is not based on the *.md file path, it seems it base on the path below? file:///C:/Users/Admin/AppData/Local/Temp/cuda_markdown_preview/
MarkdownPreview plugin writes its HTML temp file to TEMP dir. so you see folder - which is your TEMP folder. it is better to write to TEMP dir than to dir of MD file (to not make trash files in user dir).
Re: about markdown snippets and preview
Posted: 02.10.2023 11:31
by main Alexey
after using the snippet, the small up triangle mark still exist, tab button can't erase it too.
Triangle is 'marker'.
https://wiki.freepascal.org/CudaText#Markers
it must be 'jumped to' by TAB key. if you place 2 snippets (both with markers) and did not 'consume' old marker, it may leave forever. until you call from Command Palette "markers: remove all".
see how Markdown snippets are made in SublimeText / VSCode. if they don't have markers, you may suggest to remove our markers from snips.
Re: about markdown snippets and preview
Posted: 02.10.2023 11:44
by SamC
it works well before in Python and other snippets in markdown works well too, tab can consume marker. but for 'it' snippets, I can't consume it as others, tab seems not work here?
Re: about markdown snippets and preview
Posted: 02.10.2023 11:46
by SamC
main Alexey wrote: ↑02.10.2023 11:31
after using the snippet, the small up triangle mark still exist, tab button can't erase it too.
Triangle is 'marker'.
https://wiki.freepascal.org/CudaText#Markers
it must be 'jumped to' by TAB key. if you place 2 snippets (both with markers) and did not 'consume' old marker, it may leave forever. until you call from Command Palette "markers: remove all".
see how Markdown snippets are made in SublimeText / VSCode. if they don't have markers, you may suggest to remove our markers from snips.
just see the added para, I will check it, thanks!
Re: about markdown snippets and preview
Posted: 02.10.2023 11:57
by main Alexey
but for 'it' snippets, I can't consume it as others, tab seems not work here?
i tested the 'it' snippet with inserting by TAB-key and with selection. both times, tab-key consumes the marker.
write steps, how can I reproduce the 'ghost marker'?