POV-Ray : Newsgroups : povray.general : Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated Rende= Server Time
28 Mar 2024 08:38:04 EDT (-0400)
  Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated Rende= (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: J  Max Wilson
Subject: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated Rende=
Date: 11 May 2019 14:55:00
Message: <web.5cd716916914cc44c30f38c00@news.povray.org>
I posted about this in the povray.tools.general group back on April 16th, but
didn't get any responses, so I thought maybe I should share it here as well.

Visual Studio Code is a fantastic open source, cross-platform code editor
created and maintained by Microsoft. It has a powerful extension API that can be
used to add syntax highlighting, code snippets, intellisense, linting, and build
tasks. Developers have created extensions to add support for
just about every programming and scripting language under the sun.

I've created an extension that adds POV-Ray support to Visual Studio Code. It
turns VS Code into a powerful cross-platform POV-Ray editor. If you have POV-Ray
installed to run on the command line, the extension can also run POV-Ray to
render the current scene file and display the resulting image right in VS Code.

It's still a work in progress, but it is highly functional, and there have been
many bug fixes and improvements since I first posted about it a month ago.

Here is an animated gif of VS Code + POV-Ray in action:
https://raw.githubusercontent.com/jmaxwilson/vscode-povray/master/images/vscode-povray-demo.gif

It works on Windows 10, Mac OS X, and Linux distros supported by VS Code like
Ubuntu.

Give it a try and let me know what you think.

Download Visual Studio Code:
https://code.visualstudio.com/

Install the POV-Ray extension:
https://marketplace.visualstudio.com/items?itemName=jmaxwilson.vscode-povray

( If you want to use the integrated render feature, you will need to have
POV-Ray installed and configured to run on the command line, and make sure it
can be run from any directory by adding it to your PATH. )

Thanks!


Post a reply to this message

From: William F Pokorny
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated Rende=
Date: 12 May 2019 08:37:48
Message: <5cd8139c$1@news.povray.org>
On 5/11/19 2:52 PM, J. Max Wilson wrote:
> I posted about this in the povray.tools.general group back on April 16th, but
> didn't get any responses, so I thought maybe I should share it here as well.
> 
> Visual Studio Code is a fantastic open source, cross-platform code editor
> created and maintained by Microsoft. It has a powerful extension API that can be
> used to add syntax highlighting, code snippets, intellisense, linting, and build
> tasks. Developers have created extensions to add support for
> just about every programming and scripting language under the sun.
> 
> I've created an extension that adds POV-Ray support to Visual Studio Code. It
> turns VS Code into a powerful cross-platform POV-Ray editor. If you have POV-Ray
> installed to run on the command line, the extension can also run POV-Ray to
> render the current scene file and display the resulting image right in VS Code.
> 
...
> Thanks!
> 

Yes, this is the better place to post about your work - though I did see 
and review your original. You've now put a link to your very cool github 
animation into the new post's text I see - that's to the good! Aside: 
Your use of github proves again too me there is also a lot about github 
I don't know. I've seen some really slick web pages / blogs on github.

For some years I've been in the market for a new linux editor. My day to 
day editor is long a self supported kludge of a thing with a growing 
list of minor issues. It's also lacking major features like language 
syntax highlighting - though I'm old enough and so long using Matrix 
green (from my 3277 terminal days) I'm not completely sure I'd adopt all 
the colors.

Your good work & now VSC itself is on my list to examine when I get to 
jumping to something new. On a list along with some gvim work Jerome 
posted a while back (I can get by already with vi) - and a few other 
common linux editors.

The current POV-Ray windows editor is a dated beast, but I know next to 
nothing about it, or, whether replacing the POV-Ray editor with 
something like an open source VSC a possibility. I see your demo - and 
your interest in active support for your work - and I think "maybe." 
But, it's certainly not my call.

Editor wise for me, it's the pain of jumping to something new day to day 
that's kept me stuck where I am. I'm always in the middle of a bunch of 
projects. I'll have to effectively pause other work then live with the 
slog back to full speed - or better. Today my editor use is nearly all 
muscle memory. My fingers move and stuff I need to happen, happens.

Anyway! I got long winded. I'm interested in your work and I plan to 
give it a try along with VSC itself for tcl, c, c++, etc. - at some point.

I did not catch mention of what version(s) of POV-Ray SDL you support 
out of the box. I assume v3.7?

Bill P.


Post a reply to this message

From: Mike Horvath
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated Rende=
Date: 13 May 2019 04:55:29
Message: <5cd93101$1@news.povray.org>
On 5/11/2019 2:52 PM, J. Max Wilson wrote:
> I posted about this in the povray.tools.general group back on April 16th, but
> didn't get any responses, so I thought maybe I should share it here as well.
> 
> Visual Studio Code is a fantastic open source, cross-platform code editor
> created and maintained by Microsoft. It has a powerful extension API that can be
> used to add syntax highlighting, code snippets, intellisense, linting, and build
> tasks. Developers have created extensions to add support for
> just about every programming and scripting language under the sun.
> 
> I've created an extension that adds POV-Ray support to Visual Studio Code. It
> turns VS Code into a powerful cross-platform POV-Ray editor. If you have POV-Ray
> installed to run on the command line, the extension can also run POV-Ray to
> render the current scene file and display the resulting image right in VS Code.
> 
> It's still a work in progress, but it is highly functional, and there have been
> many bug fixes and improvements since I first posted about it a month ago.
> 
> Here is an animated gif of VS Code + POV-Ray in action:
>
https://raw.githubusercontent.com/jmaxwilson/vscode-povray/master/images/vscode-povray-demo.gif
> 
> It works on Windows 10, Mac OS X, and Linux distros supported by VS Code like
> Ubuntu.
> 
> Give it a try and let me know what you think.
> 
> Download Visual Studio Code:
> https://code.visualstudio.com/
> 
> Install the POV-Ray extension:
> https://marketplace.visualstudio.com/items?itemName=jmaxwilson.vscode-povray
> 
> ( If you want to use the integrated render feature, you will need to have
> POV-Ray installed and configured to run on the command line, and make sure it
> can be run from any directory by adding it to your PATH. )
> 
> Thanks!
> 
> 
> 
> 
> 
> 
> 


I like how in your GIF you can see the list of projects/folders/files on 
the left. But our current Windows editor has lots of other stuff that I 
am  not sure I can live without. For instance, the command line input 
field. The INI drop down list with individual sections. The integration 
of the help file (though this is unfortunately broken in the latest 
POV-Ray version). And so much other stuff.

Michael


Post a reply to this message

From: jr
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated R=
Date: 13 May 2019 11:55:01
Message: <web.5cd9923b569aadba2aab1e70@news.povray.org>
hi,

William F Pokorny <ano### [at] anonymousorg> wrote:
> For some years I've been in the market for a new linux editor.
> ... to examine when I get to
> jumping to something new. On a list along with some gvim work Jerome
> posted a while back (I can get by already with vi) - and a few other
> common linux editors.

some years ago I bought "Practical Vim" by Drew Neil, find it an often used
reference.


regards, jr.


Post a reply to this message

From: J  Max Wilson
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated R=
Date: 13 May 2019 14:15:04
Message: <web.5cd9b3ce569aadbcad34d700@news.povray.org>
Thanks for chiming in, Bill.

William F Pokorny <ano### [at] anonymousorg> wrote:

> Editor wise for me, it's the pain of jumping to something new day to day
> that's kept me stuck where I am. I'm always in the middle of a bunch of
> projects. I'll have to effectively pause other work then live with the
> slog back to full speed - or better. Today my editor use is nearly all
> muscle memory. My fingers move and stuff I need to happen, happens.

Yes, I've experienced this too. When you've become productive with one tool it
is difficult to be motivated to fight against the inertia and try something
else-- especially when you have projects that need attention.

I started using VS Code when I decided that I needed to expand my skill set with
some new technologies. I started learning to code in Go and Node, and VS Code
was the natural choice for working with them. Only after I was using it for
those languages did I start using it for other languages.

VS Code does allow you to customize the key-bindings. There is even an extension
to use vim key-bindings so that developers who are proficient with vi can
continue to be productive using VS Code. So theoretically you could replicate
many of strokes stored in your muscle-memory.

>
> I did not catch mention of what version(s) of POV-Ray SDL you support
> out of the box. I assume v3.7?

The syntax highlighting and code snippets are fairly generic at this point, but
they are based on v3.7. However, the render feature just calls whichever version
of povray is available through the command line.

If you have Docker installed, you can have the extension run POV-Ray from a
docker container instead. I have docker containers for 3.7 stable and 3.8 alpha.


Post a reply to this message

From: J  Max Wilson
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated R=
Date: 13 May 2019 15:00:01
Message: <web.5cd9bde0569aadbcad34d700@news.povray.org>
Thanks, Mike,

Mike Horvath <mik### [at] gmailcom> wrote:

> I like how in your GIF you can see the list of projects/folders/files on
> the left. But our current Windows editor has lots of other stuff that I
> am  not sure I can live without. For instance, the command line input
> field. The INI drop down list with individual sections. The integration
> of the help file (though this is unfortunately broken in the latest
> POV-Ray version). And so much other stuff.

Yes, the Windows editor has many years of accumulated features that the VS Code
extension hasn't implemented... yet.

Though it isn't conveniently available in the toolbar like in the Windows
editor, the VS Code extension does have the ability to customize the command

Commandline Options). And those custom options can be configured as a general
user setting or specifically for the current workspace.

The ability to select from a list of pre-configured INIs for rendering is a
feature that I can look into adding. I suspect that, in time, many of the other
features can be added as well.

As I see it, one advantage of using VS Code is that the editor itself is
maintained by Microsoft as an open source project and has a huge user base. That
means that Microsoft will take care of implementing all of the standard code
editor features (syntax highlighting, code folding, multi-cursor editing, regex
search and replace, file browsing, copy/paste, tabs, etc). That means that
extension can focus on POV-Ray specific editor stuff instead of having to tackle
all of the standard editor features too. And POv-Ray itself can focus on the SDL
interpreter and rendering engine.

And since the existing POV-Ray Editor isn't available to Mac and Linux users,
the VS Code extension fills that void nicely. It also has an open source MIT
license, so it avoids the licensing issues of the current Windows editor.

That said, I completely agree with your concerns. If you are a productive user
of the existing editor, then there isn't much incentive to switch.

The multi-cursor editing, code snippets, and regex search and replace might
tempt you though. :)

Multi-Cursor editing:

https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_multi-cursor-selection

POV-Ray Code Snippets:

https://raw.githubusercontent.com/jmaxwilson/vscode-povray/master/images/vscode-povray-snippets-demo.gif

RegEx Search and Replace:
https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_search-and-modify

J. Max


Post a reply to this message

From: William F Pokorny
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated R=
Date: 15 May 2019 08:56:12
Message: <5cdc0c6c$1@news.povray.org>
On 5/13/19 11:50 AM, jr wrote:
> hi,
...
> 
> some years ago I bought "Practical Vim" by Drew Neil, find it an often used
> reference.
> 

Thanks for the pointer. It's on my to-do list to get such a book.

I've got an old vi book from when traditional vi was what one found on 
all *nix systems. Now suppose it's often/usually? vim by 'vi'.

Bill P.


Post a reply to this message

From: jr
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated R=
Date: 16 May 2019 18:20:02
Message: <web.5cdde162fb642dd8a2aab1e70@news.povray.org>
hi,

William F Pokorny <ano### [at] anonymousorg> wrote:
> > ... "Practical Vim" by Drew Neil, ...
> Thanks for the pointer. It's on my to-do list to get such a book.

just saw that a second edition has been released.

> I've got an old vi book from when traditional vi was what one found on
> all *nix systems. Now suppose it's often/usually? vim by 'vi'.

guess so, "Vi IMproved" after all.  :-)  have not seen a real 'vi' installed in
... years.  perhaps the BSD people still carry that program.  as installed,
Slackware defaults to using 'elvis', and changing that (symlink) to 'vim' is the
very first thing.  :-)


regards, jr.


Post a reply to this message

From: Benjamin Chambers
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated R=
Date: 26 May 2019 10:17:21
Message: <037e7498-91a6-eda6-9bce-15404bf650ee@outlook.com>
I haven't looked at VS Code much, but can you embed it in other 
projects? Would it be possible to include in a custom build of POV 
instead of the current editor? That way we could keep things such as INI 
selection.


Post a reply to this message

From: J  Max Wilson
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated R=
Date: 28 May 2019 13:45:04
Message: <web.5ced7387fb642dd8cad34d700@news.povray.org>
Benjamin Chambers <ben### [at] outlookcom> wrote:

> I haven't looked at VS Code much, but can you embed it in other
> projects? Would it be possible to include in a custom build of POV
> instead of the current editor? That way we could keep things such as INI
> selection.

That would be an interesting option, Benjamin. Based on its technology stack and
architecture, I suspect that embedding VS Code into the POV-Ray executable won't
be an easy option.

VS Code is built using Electron and Node. That means that it uses the V8
JavaScript engine use by the Chromium Browser as a cross-platform foundation for
building desktop applications using web technologies like JavaScript, CSS3, and
HTML5, with additional hooks into native OS functionality.

Node does apparently have the ability to wrap and incorporate C++ addons, so
there still might be a way.

However, I think that it will prove easier to replicate INI selection and other
helpful POV-Ray specific features than it would be to try to embed VS Code into
POV-Ray. And it would make those features available to users on Mac and Linux
that can't run the Windows POV-Ray.

J. Max


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.