Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin 'Snippets' - select multiple snippets and resize Snippets Menu #5776

Closed
FranciscoBomfim opened this issue Nov 11, 2024 · 18 comments
Closed
Labels

Comments

@FranciscoBomfim
Copy link

• Good evening everyone.
• I use the magnificent CudaText a lot and in many ways.
• Now, with Alexey's gratifying help, the Snippets plugin has greatly increased the possibilities of use, several words in the filter, for me, who has thousands of tags (snippets) to insert in the various files I work on.
• I would like to ask Alexey for one more favor.

  1. Enlarge the Snippets menu window vertically. (larger display of filtered tags - Snippets filter menu)
  2. When you click TAB in the displayed list, insert the selected Snippet into the text and the Snippets Menu remains open on the screen so that you can choose other tags and after clicking ESC exit the Snippets Menu.
    • My list of Snippets exceeds 4,000 to categorize several lines of many text bases.
    • The excellent Snippets plugin, greatly improved with Alexey's help, is also very well managed by the lovely CudaText.
    • Sincere thanks to Alexey.
    • Thank you for your attention.
@Alexey-T
Copy link
Owner

  1. One of "...listbox..." options in user config allows to change width/height of command palette. Snippets dlg must obey that option. It is solution for you.
  2. Currently not possible to close menu dialogs by tab key. What you can do, is assign the "alias" for your snippets and then tab key can call snippet if you typed the alias before. It is written in the wiki page "cudatext plugins".

@FranciscoBomfim
Copy link
Author

Good morning!
Thank you for your attention.
Snippets Menu -> select multiple options from the list
Thank you very much.

@FranciscoBomfim
Copy link
Author

FranciscoBomfim commented Nov 11, 2024 via email

@Alexey-T
Copy link
Owner

What do you mean? See my reply above.

@FranciscoBomfim
Copy link
Author

summary request.
selecting multiple items from the menu snippets list
would solve my problem.
thanks for your attention.

@Alexey-T
Copy link
Owner

Maybe i can add reaction to Alt+enter in snippets menu. Instead of tab key. I will think..

@Alexey-T
Copy link
Owner

I will see what i can do with Alt+enter in snippets dlg. Maybe this week.

Thanks.

@Alexey-T
Copy link
Owner

By age, you are one generation older than me.

@Alexey-T
Copy link
Owner

try this updated plugin.
plugin.Snippets.zip
to install: open zip file in Cud via File/Open.

2024.11.14

  • add: Ctrl+Enter (and Ctrl+mouse_click) in snippets dialog makes dialog appear again after snippet insertion

@FranciscoBomfim
Copy link
Author

FranciscoBomfim commented Nov 14, 2024 via email

@Alexey-T
Copy link
Owner

Adding of alias to menu captions of dlg_menu is feasible. I will try to add it.

Keeping filter is not yet possible. But i have idea how to improve Cud so it will always keep filter if dlg_menu is called second time with the same items. Will try to add it. Later, maybe this or next week.

@Alexey-T
Copy link
Owner

Regex- instead of alfabet, you can write

[a-z]

@Alexey-T
Copy link
Owner

You use windows, right?

@Alexey-T
Copy link
Owner

Sorry, no, inserting of only alias is not supported. Alias is type the text in editor and press tab key. Wiki describes it.

@FranciscoBomfim
Copy link
Author

FranciscoBomfim commented Nov 18, 2024 via email

@Alexey-T
Copy link
Owner

Alexey-T commented Dec 4, 2024

@FranciscoBomfim
hi. you suggested to add snippet alias to the snippet names,
in the Snippets plugin menu-dlg.
i can add it. but it looks bad in case of HTML snippets and C++ snippets.

e.g. HTML snippets

Screenshot from 2024-12-04 12-35-12

you see that name of each snippet is almost like alias.
so adding alias here will be bad.
it will be 2 aliases in name and 1 alias right-aligned.

same for eg C++ snippets ("plugins / addons manager / install VScode snippets", then choose C++ Basic Snippets package).
C++ snippets also have name almst like alias.

Screenshot from 2024-12-04 12-37-59

suggestion is ok only for your custom snippets.
but bad for usual snippets.

@Alexey-T
Copy link
Owner

Alexey-T commented Dec 4, 2024

what you can do here is to edit your custom snippets. you can add alias near the name:

name before: NameName
alias: Aaaa

name after: NameName (Aaaa)
alias: Aaaa

@Alexey-T Alexey-T changed the title Plugin Snippet - select multiple snippets and resize screen Snippets Menu Plugin 'Snippets' - select multiple snippets and resize Snippets Menu Dec 4, 2024
@FranciscoBomfim
Copy link
Author

#5801 (comment)

@Alexey-T Alexey-T closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants