POV-Ray : Newsgroups : povray.general : Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated Rende= Server Time
27 Apr 2024 02:04:03 EDT (-0400)
  Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated Rende= (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
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

From: J  Max Wilson
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated R=
Date: 1 Jul 2019 15:40:00
Message: <web.5d1a608efb642dd8cad34d700@news.povray.org>
Just a quick update on the POV-Ray extensions for Visual Studio Code:

We're now up to over 200 installs of the extension!

https://marketplace.visualstudio.com/items?itemName=jmaxwilson.vscode-povray

I'm neck deep in a work project, but there will be additional enhancements and
features.

J. Max


Post a reply to this message

From: Mr
Subject: Re: Visual Studio Code as a Cross-Platform POV-Ray Editor with Integrated R=
Date: 28 Feb 2022 18:15:00
Message: <web.621d572dfb642dd834c7846e6830a892@news.povray.org>
"J. Max Wilson" <nomail@nomail> wrote:
> Just a quick update on the POV-Ray extensions for Visual Studio Code:
>
> We're now up to over 200 installs of the extension!
>
> https://marketplace.visualstudio.com/items?itemName=jmaxwilson.vscode-povray
>
> I'm neck deep in a work project, but there will be additional enhancements and
> features.
>
> J. Max

Hello,
I've been using your extension progressively because I tend to switch platforms
and editors a lot. The syntax highlighting of pov files in the same app that
could also highlight the python files of the Blender to povray addon was
attractive, as in: debug the python by looking at their output pov files and the
terminal render log... All seamlessly! Even though I love some killer features
and UX of PyCharm, Vim ubiquity, OS lightness of QTpov, feature wealth of
POVWin, the cross platform + cross languages + killer extensions of VScod(ium)
could make yours another absolute must have, aside from any heart felt
preference.

Now, I do this on a mac and there, the build task is not setup out of the box
and when I manage to set it up, I keep having to redo it manually depending on
the folders I'm in. Isn't there a way to make this be setup automagically more
globally even when no folder is open or stay valid when we move at of some
project's scope ? I also have a bad untrusted workspace default for pov which
isn't the case with other formats I open.

To update the syntax, maybe what we did for the Blender text editor can help you
get partway there?
(https://fossies.org/linux/blender/source/blender/editors/space_text/text_format_pov.c
and
https://fossies.org/linux/blender/source/blender/editors/space_text/text_format_pov_ini.c)


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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