Snippet and autocomplete

CodeLite installation/troubleshooting forum
cheina97
CodeLite Curious
Posts: 9
Joined: Sun Oct 08, 2017 1:17 pm
Genuine User: Yes
IDE Question: c++
Contact:

Snippet and autocomplete

Post by cheina97 »

Goodmorning, i'm new on this website.
I'm Cheina and i'm from Italy, so sorry for my horrible english.
I noticed that in Codelite i'm unable to add my Snippets to the autocomplete.
For example, when i write "for" i can only see the key word "for" and when i press enter it doesn't write for($=0,$<@,$++).
i'm a bit confused, i didn't understand if there's something wrong or if i want to do something that is not possible.
Maybe that's a stupid question, but the autocomplete is based on the compiler or on the IDE?
Thank you for reading.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Snippet and autocomplete

Post by eranif »

The Snippet plugin was developed by a third party.
I did look at the code and it seems that it only works for C++ files

However, it does not work the way you think it should...
The completion box does not trigger the snippets, it only adds what you see in the completion box.

You could try and use the abbreviation plugin which kinda does what you are looking for (however, the multiple caret support will be out as part of CodeLite 11, due date: this week)

1. From Plugins->Abbreviations->Settings
2. Add new abbreviation named "for_php"
3. Use the pipe ("|") to indicate where the caret should be placed
4. Use Ctrl-Alt-SPACE to get the abbreviation completion box

See images attached
abb-1.png
abb-2.png
abb-3.png
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
cheina97
CodeLite Curious
Posts: 9
Joined: Sun Oct 08, 2017 1:17 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Snippet and autocomplete

Post by cheina97 »

Thank you for the good explanation.
So there is no way to add an abbreviation to the auto-completition?
Post Reply