Snippet Panel context menu
Snippet Panel context menu
Wish: direct access to the file that contains the clip I hover over. Like Synwrite does it. I don't need a dialog. A simple "Edit this file" is sufficient.
-
- Posts: 2323
- Joined: 25.08.2021 18:15
-
- Posts: 2323
- Joined: 25.08.2021 18:15
I see what you mean.
For me, it were sufficient to only gain access to \data\clips and it's various subfolders. But I realize, this might confuse other users, when it only works for certain entries and not everywhere.
Guess I will have to consolidate my snippets into one txt-file only, per category/subfolder. Then add \data\clips to all my projects and switch back and forth in the side panels.
Btw, Synwrite also allowed *.synw-snippet files in the side panel. Cuda does not.
It was useful when writing documentations, to insert example snippets, even though they did not belong to txt or md or html. Now I have to open a separate doc with the correct lexer, so I can get to the right snippets menu, then insert from there, cut and paste it over to my documentation tab. No big deal, it's doable. But Synwrite was more flexible in that respect.
For me, it were sufficient to only gain access to \data\clips and it's various subfolders. But I realize, this might confuse other users, when it only works for certain entries and not everywhere.
Guess I will have to consolidate my snippets into one txt-file only, per category/subfolder. Then add \data\clips to all my projects and switch back and forth in the side panels.
Btw, Synwrite also allowed *.synw-snippet files in the side panel. Cuda does not.
It was useful when writing documentations, to insert example snippets, even though they did not belong to txt or md or html. Now I have to open a separate doc with the correct lexer, so I can get to the right snippets menu, then insert from there, cut and paste it over to my documentation tab. No big deal, it's doable. But Synwrite was more flexible in that respect.
-
- Posts: 2323
- Joined: 25.08.2021 18:15
hm, is it hard to convert old *.synw-snippet files to format of Snippet Panel?
it's documented: https://wiki.lazarus.freepascal.org/Cud ... ppet_Panel
it's documented: https://wiki.lazarus.freepascal.org/Cud ... ppet_Panel
Not sure I understand. Are you saying, I should be able to read in .cuda-snippet files located in data\clips\MyCategory into the side panel? I was under the impression, that both, .cuda-snippet and .synwrite-snippet only work from the snippets MENU, after I paste them into the \data\snippets_ct\MyLexer\*.json file, but not from the side panel.
-
- Posts: 2323
- Joined: 25.08.2021 18:15
Exactly. That's what I meant. I cannot use my .synw-snippet files in the side panel.
How would I do that? The documentation says, it only supports the ${sel} macro. All my ${NN:default text} etc does not seem to work from the side panel. I have to insert them one by one into the Snippets Menu and replace the double // by single /. And then they are lexer-bound. I have tried to not assign a lexer, but did not succeed.main Alexey wrote:hm, is it hard to convert old *.synw-snippet files to format of Snippet Panel?
it's documented: https://wiki.lazarus.freepascal.org/Cud ... ppet_Panel
-
- Posts: 2323
- Joined: 25.08.2021 18:15
>all my ${NN:default text} etc does not seem to work from the side panel.
yes. sorry, such tab-stops won't work with the Snippet Panel.
> I have tried to not assign a lexer, but did not succeed.
sounds like a bug in Snippets plugin. snippets must support 'any lexer' when lexer is not set.
give me 1-2 such snippets to test.
yes. sorry, such tab-stops won't work with the Snippet Panel.
> I have tried to not assign a lexer, but did not succeed.
sounds like a bug in Snippets plugin. snippets must support 'any lexer' when lexer is not set.
give me 1-2 such snippets to test.
-
- Posts: 2323
- Joined: 25.08.2021 18:15