Thanks to ac WEB DESIGN for reporting both the issues corrected in this release and for furnishing suitable test content.
Visual Studio Code Printing
Code listings are iconic in a sense older than graphical user interfaces. I can't give you dot-matrix on blue-lined 15" fanfold paper, but I can give you line numbers, and double spacing to allow annotation with a pencil.
The print icon on the toolbar prints the document in the active editor.
If you have a text selection that crosses at least one line-break you can right click and choose Print from the context menu to send just the selection to the printer. In the absence of a multi-line selection the entire document is printed. You can control the position of Print in this menu, or remove it altogether.
Or you can right-click on a file in the file explorer pane and choose Print from the context menu.
Printing on Mac, Linux and Windows
- Entirely local in operation, no dependence on cloud services
- Syntax colouring in a wide range of familiar colour schemes that you can import or modify
- Optional line numbering
- Adjustable line spacing (1, 1.5, 2)
- Print a selection of code with line numbers matching the editor
- Specify a browser other than your default
- Markdown documents are rendered when you print them (or not, there's a setting)
You'll need a web browser and access to a printer.
This extension contributes the following settings:
print.alternateBrowser: enable/disable an alternate browser
print.announcePortAcquisition: make the embedded web server tell you what port it uses
print.browserPath: the path to a web browser
print.colourScheme: the stylesheet used for colouring syntax
print.editorContextMenuItemPosition: the position of
Print in the editor context menu
print.fontSize: the font size
print.formatMarkdown: render markdown as styled HTML when printing
print.lineNumbers: on, off or inherit (do same as editor)
print.lineSpacing: single, line-and-a-half or double spaced
Making printed tabs respect the editor tab size setting depends on the experimental CSS
tab-size property. This doesn't work on Edge. When Edge starts using the Chromium engine the problem will go away.
Chrome remembers too much about printers, paper sizes and margins especially if you abort.