Page 1 of 1

H6 Snippets for Visual Studio Code

Posted: Sun Nov 12, 2017 3:51 pm
by misohoza
Anyone using Visual Studio Code as external script editor?

I wanted to share my user snippets. They contain pre-defined functions used by Halion and also modulation source and destination type names.
I packaged the snippets as extension. Just search for "H6 Snippets" in vscode extensions.

Image

Re: H6 Snippets for Visual Studio Code

Posted: Fri Nov 17, 2017 8:43 am
by AposMus
I'm using brackets and tinkered with the lua extension to include Halion function for highlighting, but not auto-completion.

Think I'm going to give Visual Studio Code a try though, because this will save major amounts of time.

Re: H6 Snippets for Visual Studio Code

Posted: Fri Nov 17, 2017 11:54 am
by AposMus
I'm liking VSC a lot. Seems more polished than Brackets and the lua integration is much better.

Your snippets are the best thing since butter on toast BTW. Really enjoying it.

Re: H6 Snippets for Visual Studio Code

Posted: Fri Nov 17, 2017 1:43 pm
by misohoza
Hi Aposmus,

I'm glad you like it.

I was using Zerobrane studio which I think is a great lua editor with debugger, but not that easy to expand or customize. Unless you really know what you're doing.

In VSC you can easily expand the extension with your own user snippets. They can also be more complex and can be assigned to key command.

I've assigned (Shift+I then 1) to insert the following, where I can tab through the "$" placeholders.

Code: Select all

for i, $ in ipairs($) do
    $
end

Re: H6 Snippets for Visual Studio Code

Posted: Fri Nov 17, 2017 4:46 pm
by AposMus
Yes, Brackets also has lots of expansion capabilities, but not in any user friendly way.

Have you tried this Lua extension for VSC https://marketplace.visualstudio.com/it ... eyring.Lua
It does great auto completing and has functions like "for" for normal loop, "fori" for ipairs and "forp" for pairs and many others.

Re: H6 Snippets for Visual Studio Code

Posted: Sat Nov 18, 2017 2:50 pm
by misohoza
AposMus wrote:
Fri Nov 17, 2017 4:46 pm
Yes, Brackets also has lots of expansion capabilities, but not in any user friendly way.

Have you tried this Lua extension for VSC https://marketplace.visualstudio.com/it ... eyring.Lua
It does great auto completing and has functions like "for" for normal loop, "fori" for ipairs and "forp" for pairs and many others.
:D This one is one of the most popular. Yes, I've tried it and it's great. But I find the autocomplete to be "too good" at times. So you end up deleting and changing a lot of things afterwards.

Another thing I've noticed is that if you have too many extensions active at the same time they can cause conflicts.

Re: H6 Snippets for Visual Studio Code

Posted: Sun Nov 19, 2017 10:56 pm
by AposMus
I'm busy with a Halion function highlighter for VS Code. Will share the link when I'm done, if anyone is interested.

It helps a lot if you can quickly identify Halion Script functions by colour in a long script.

Re: H6 Snippets for Visual Studio Code

Posted: Sun Jan 07, 2018 2:18 am
by abject39
Awesome! You're the real MVP!