Snippet Panel Ideas

Post Reply
Random Void User
Posts: 112
Joined: 13.07.2024 21:19

Snippet Panel Ideas

Post by Random Void User »

Wiki should clarify expectations for custom snippet panel data.

(1) User must create new sub-folder, data/clips
(2) Each list lives in a sub-sub-folder, data/clips/mysnipsname
(3) mysnipsname appears on the snippets panel drop-down menu
(4) Actual snippet file is data/clips/mysnipsname/List.txt

Snippet panel needs a font setting in Options. I use a monospace font for documents, but a proportional font for UI. Snippet text will insert into the document being edited. So the document font makes more sense for displaying snippet lists. It then shows how the character will appear in the document.

Some fonts support more Unicode than others, so the panel font may matter more than just visual cues. The snippet panel could reveal that the current document font lacks a desired character; but only if it uses the same font as the document.

The snippet panel drop-down should remain in UI font, it is a UI item, but the list contents should be in the document font, or have their own setting. Some users might prefer monospace for snippet list column alignments, no matter the document font.

So I propose options like:
ui_font_snippets_panel_lists_same_as_document (T/F)
ui_font_snippets_panel_lists (font name, size, style)

The first option overrides the second. The second only works if the first is false.

Let me know if I've missed any settings in Cud or plug-ins that already approximate these notions. Thanks!
main Alexey
Posts: 2990
Joined: 25.08.2021 18:15

Re: Snippet Panel Ideas

Post by main Alexey »

Ok to add wiki info. Added your lines to the 'Plugins' wiki page in the 'Snippet Panel' topic.

Option for the font name: will think.
main Alexey
Posts: 2990
Joined: 25.08.2021 18:15

Re: Snippet Panel Ideas

Post by main Alexey »

Font-options (for the listbox UI control) were added.
+ add: Snippet Panel plugin: new options "font_name", "font_size"; and new command/menuitem "Config"

Get updated *.py and *.inf files from my Git:
https://github.com/Alexey-T/CudaText/tree/master/app/py

and test.
options are in the settings/plugins.ini, [snippet_panel] section.

Also added the font-options for the filter-UI-control, to the Tabs_list plugin.
I don't write your nickname in the readme/history.txt file, because you chosen the nickname to be looking like you want incognito.
Post Reply