BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Snippet

Go down

Snippet Empty Snippet

Post by ADbve Wed Jan 06, 2021 5:35 am

Hello i want to share some snippet i made for csv, b3d and animated files. The snippet i made just for Visual studio code, if you want to convert to other software like sublime text,atom or notepad++ you should convert it yourself.
Before you download this snippet you should remember, this snippet NOT plug and play i mean you should make global or per-language snippet before using it.

You can click the link below to make snippet in vscode : https://code.visualstudio.com/docs/editor/userdefinedsnippets

Click this link to see snippet i made : https://github.com/adfriz/OpenbveSnippet

NOTE : snippet for making csv route are not finished yet. If you have some question do not hesitate to ask Very Happy

ADbve

Posts : 22
Join date : 2020-05-14

Midnight Express Ginga81 likes this post

Back to top Go down

Snippet Empty Re: Snippet

Post by ap1991 Thu Jan 07, 2021 4:49 am

I will apologies in advance as this may be a stupid question, but what is this and what does it do?
ap1991
ap1991

Posts : 283
Join date : 2014-07-25
Age : 29
Location : Warwickshire

https://adamp19914.wixsite.com/bvecentral

graymac likes this post

Back to top Go down

Snippet Empty Re: Snippet

Post by Dexter Wed Jan 13, 2021 8:44 pm

Umm... YAY???
Dexter
Dexter

Posts : 2102
Join date : 2011-07-08
Age : 35
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Snippet Empty Re: Snippet

Post by Midnight Express Ginga81 Thu Jan 14, 2021 8:11 am

As we know, vscode is programming editor. When we create programs, Visual Studio is powerful input command support.
For example, when we input some of a part of variable, shows variable list automatically.
He think that may be this system is very useful, so he created the input  support for OpenBVE.
For example, when we are attempt to input 'SetTextureCoordinates',  at this editor, We only to input 'SetTe', vscode is show the SetTextureCoordinates automatically, and show the usage how it means and input automatically.
So we are very easy to create and very low typo.
https://code.visualstudio.com/docs/editor/userdefinedsnippets

Midnight Express Ginga81

Posts : 66
Join date : 2016-09-25

Back to top Go down

Snippet Empty Re: Snippet

Post by Quork Thu Jan 14, 2021 10:46 am

Ah, now it makes sense! I'm not aware of anyone ever having used visual studio for add-on creation here in this board, that's why noone had a clue what this is about. Sounds very sensible actually!
Quork
Quork

Posts : 1388
Join date : 2012-05-05
Age : 29
Location : Hofheim a.T., Hessen (Hesse), European Union

Midnight Express Ginga81 likes this post

Back to top Go down

Snippet Empty Re: Snippet

Post by Dexter Thu Jan 21, 2021 12:06 pm

Well, I have been using Phil's openBVE script editor and I find it very sensible, too... I believe it only works for route creation, though, not for objects. Looks like this snippet does it the other way around. :-)
Dexter
Dexter

Posts : 2102
Join date : 2011-07-08
Age : 35
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Snippet Empty Re: Snippet

Post by phileakins Thu Jan 21, 2021 7:03 pm

No - it contains all the (Michelle originated) commands to do objects as well  Very Happy . It doesn't do any of Chris's latest stuff ...... Yet!

I've been idly tinkering with the editor's data structure with a view to making it much simpler, about time I can hear Mr Lees thinking, based on a distributed database and a more professional design paradigm (I'm thinking MVVM here). Perhaps I should crack on and produce version 2.0 then.  pale  I need something to keep me occupied: this lockdown stuff is making visits to the off-licence rather too frequent.

Nice to know that you are still using it Dexter thanks for the compliment as well.

Regards and stay safe.

Phil

PS I've been recently learning about Visual Studio Snippets, coincidentally; it's really designed for a quick and easy insertion of frequently used, and editable, segments of code, not really intended as a macro.

phileakins

Posts : 94
Join date : 2011-08-08
Age : 74
Location : Swanage, Dorset

Back to top Go down

Snippet Empty Re: Snippet

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum