text editor with snippets

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
6 posts Page 1 of 1
Contributors
User avatar
TADS
VIP - Donator
VIP - Donator
Posts: 45
Joined: Sun Jan 22, 2012 9:06 pm

text editor with snippets
TADS
Evening All.

i would like to make my own text editor that has "built in snippets".... i can do the highlighting etc i use ScintillaNET but unable to find any information on how i can use snippets, unless someone here has done this before? i have used this to make "keywords" but not full snippets.

or any ideas on how i could go about doing this sort of project? My mind is just "A Blank" atm and can not think of the best way to do it.

Hope someone has some ideas

Thanks
Kev
Oval Racer Series Games - https://ovalgames.co.uk/
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: text editor with snippets
comathi
I'm not exactly sure what you mean by "snippets".

If you mean you want to insert code snippets and highlight them according to the language in which they're written, I would think that's done in the same way as individual tags, just multiple times inside the snippet... What I'm saying might be a little unclear as well lol :?
User avatar
TADS
VIP - Donator
VIP - Donator
Posts: 45
Joined: Sun Jan 22, 2012 9:06 pm

Re: text editor with snippets
TADS
hi thanks for the reply.

yea i want to insert code snippets the highlight is done auto now anyways. i just can not think how i can "store" snippets and use them as i need them... it would be nice to start typing and you can select the snippet from the auto list that pops up.
codeview.jpg
as you see from the image i have "keywords" workiing, i just can not remember how to do the snippets! :(

Kev
You do not have the required permissions to view the files attached to this post.
Oval Racer Series Games - https://ovalgames.co.uk/
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: text editor with snippets
comathi
Okay, I understand... Well you would first need to detect whether or not the code that has been typed is part of a snippet (this could be difficult if there are more than one syntaxes, or parameters within the snippet) and then display the snippets for which this is true.

As for storing them, you could probably have a plain text file somewhere where the snippets are written down and seperated by some special character chain. Moreover, this could enable the user to add custom snippets and have them displayed along with the built-in ones.
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: text editor with snippets
Filip
I think you could use mysql database and store it on some web server. Then get the xml fe which would be cached for offline mode.
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
TADS
VIP - Donator
VIP - Donator
Posts: 45
Joined: Sun Jan 22, 2012 9:06 pm

Re: text editor with snippets
TADS
its ojk, i have worked out how to do it with ScintillaNET again.

Thanks for the replys
Oval Racer Series Games - https://ovalgames.co.uk/
6 posts Page 1 of 1
Return to “Coding Help & Support”