openscad-support-vscode icon indicating copy to clipboard operation
openscad-support-vscode copied to clipboard

[Feature request] Keybinding for Rendering

Open roaldarbol opened this issue 1 year ago • 6 comments

First of all thanks for this extension, it's absolutely amazing!

One thing that I love about using VS and this extension is that is enables a keyboard only workflow. The only thing I miss for that to be fully implemented is a few keybindings - in particular Render (normally F6) (STL export would be great too and is covered in #11). Hope it could be possible in the future. :-)

roaldarbol avatar May 11 '23 13:05 roaldarbol

You can customize the keyboard shortcut. open "preferences: open keyboard shortcuts" from the command palette, and filter "@command:scad-lsp.preview".

Leathong avatar May 22 '23 03:05 Leathong

Tnanks for the tip. This is however just for the preview. Is there a way to set a keybinding for Render as well?

roaldarbol avatar May 22 '23 09:05 roaldarbol

Just save the file,openSCAD will re-render the file automatically. Or you means export? The plugin cannot export for now, you can export from openSCAD.

Leathong avatar May 23 '23 03:05 Leathong

On saving, it does Reload and Preview, not Render. If you look in the Design pane of OpenSCAD, you'll see keybindings for Reload and Preview (F4), Preview (F5), Render (F6) and 3D Print (F8) - here I'm talking about the Render (F6) action. I often use different resolutions for preview and render ($fn= $preview ? 60 : 200;), thus it would be useful to Render from VSCode.

roaldarbol avatar May 24 '23 14:05 roaldarbol

I got it, I will check if there is a command line argument for that feature.

Leathong avatar May 25 '23 02:05 Leathong

I found an overview of all the command line features here, and it does have a --render argument - hope that helps. :-)

roaldarbol avatar May 25 '23 08:05 roaldarbol