about markdown snippets and preview

SamC
Posts: 207
Joined: 12.08.2023 00:49

about markdown snippets and preview

Post 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)
20231006.jpg
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: about markdown snippets and preview

Post 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.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: about markdown snippets and preview

Post 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?
SamC
Posts: 207
Joined: 12.08.2023 00:49

Re: about markdown snippets and preview

Post 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.
SamC
Posts: 207
Joined: 12.08.2023 00:49

Re: about markdown snippets and preview

Post 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.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: about markdown snippets and preview

Post 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).
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: about markdown snippets and preview

Post 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.
SamC
Posts: 207
Joined: 12.08.2023 00:49

Re: about markdown snippets and preview

Post 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?
SamC
Posts: 207
Joined: 12.08.2023 00:49

Re: about markdown snippets and preview

Post 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!
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: about markdown snippets and preview

Post 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'?
Post Reply