Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #8907
    blackhawk
    Participant

    I am trying to get my head wrapped around WordComplete and Snippets.

    I really like the way word complete works in that as you type, it shows you a list of functions (words) that you can insert.

    Snippets, on the other hand, gives you a template to fill out, but it doesn’t show you the list in the same way that word complete does, and it much more cumbersome to select something.

    What I am looking to do is something that combines the best of both of these, so that as you type, all the snippets that match the first character and then second character etc. get shown to you. If you move your arrow down you can pick one of the snippets, then hit tab or enter and it starts the snippet process.

    Effectively, I am looking for a way to define intellisense for a non-standard language. Is this possible? Am I missing how to use these plug-ins effectively?

    #8908
    Yutaka Emura
    Keymaster

    Hello blackhawk,

    Thanks for your inputs. I will consider the improvements in future versions.

    #8910
    blackhawk
    Participant

    I take it then, that I am not confused…this is the way it operates.

    So this begs a different question…Is there some other plug-in or method for doing something similar to intellisense?

    Intellisense is actually even different than Snippets in that it does not force you to fill in the parameters of a text block. It guides you through the process of filling out the parameters for a function.

    There definitely is a place for the current snippets functionality, but I guess what I am getting at, is there also seems to be a place for intellisense-like functionality. I am not convinced, though, that they are one in the same.

    Thoughts?

    #8911
    Yutaka Emura
    Keymaster

    Hello blackhawk,

    The Projects plug-in has the intellisense-like functionality. I hope you will like that.

    Thanks!

    #8915
    blackhawk
    Participant

    Thanks for your quick reply. I am not very successful at finding out how to use Projects, it seems there is limited information.

    Does the intellisense functionality work off of the symbols list?

    If that is the case, then from what I have read in the help and forums, since this language is not a standard language, I assume that I have to create some kind of symbols list?

    How do I create that?

    Signed….even more confused…. :-(

    #8916
    blackhawk
    Participant

    For those of you who are interested…I have a “workaround” that seems to get close, but is very kludgy at best. Here is what I did and it kind of “works”.

    1 – Create a syntax highlighting file with all the keywords you want to have emEditor to know about and color for you.

    2 – Create a dictionary file with all the keywords and point your WordComplete plug-in to this dictionary file. This will allow emEditor to show you the functions you want emEditor to display in a drop down as you type.

    3 – Create a snippet for each keyword that then fills out the structure of the function.

    Seems like a lot of work to go through just to get an intellisense-like feel. It is not perfect, but at least it gets close.

    One problem with the Snippets plug-in, is the last parameter gets replaced by a tab instead of positioning the cursor at the end of the snippet, so just add another empty positional parameter and it will take care of it. (Yutaka: Perhaps this can be fixed?)

    If someone has some other suggestions, please let me know. This is a little weighty to have to maintain, and I would rather not switch to another editor.

    #8917
    blackhawk
    Participant

    Oh, and I forgot….Set the WordComplete keystroke for the Complete action to TAB in addition to ENTER so that it behaves more like intellisense does.

    Hope this helps.

    #8919
    shx
    Participant

    Blackhawk thanks for sharing that.

    What I don’t understand is what triggers the snippet to appear besides clicking on it within the snippet list. Does it automaticly appear just when the first word is typed.

    Also, isn’t it a very large job to edit all the commands with place holders?

    Steven

    #8931
    blackhawk
    Participant

    What triggers the snippet is the TRIGGER field in the properties (right-click on the snippet and choose properties). Once the trigger is fully typed, then it will show the snippet.

    This is where the problem is. In word complete, you can see multiple matches as you are typing, but with snippets, you must complete the whole trigger first. So, by combining word complete and snippets, you can get something similar.

    Yes, it is a pain to enter in all the place holders, but using the XML import and export operations on the snippets (Thanks Yutaka!! :-) ) you can do it via a file, and it goes much faster than through the UI.

    In my case, since it is a non-standard language, it has to be done somewhere. And, no doubt, I am probably the first with this language. Ah well.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.