copy your code with syntax highlight, can be used at your slide.
Now with vscode 1.10 it supports copy syntax without extra plugin. https://code.visualstudio.com/updates/v1_10#_copy-with-syntax-highlighting But it's copy as HTML format, maybe not work with keynote. This Plugin copy as RTF format to make keynote happy.
- Copy code as RTF
- Auto detect language:
markdown syntax
->vscode languageId
->file extension
- Support language to highlight
- Use pygmentize and copy-paste
Known issues: Can't work in windows until
copy-paste
support this feature
- Open code file or select code snippet in Text Editor, then press
F1
and then select/typeCopy Syntax
, or right click the Text Editor and then clickCopy Syntax
in context menu, the code with syntax highlight will copy to clipboard. - To select language to run, use press
F1
and then select/typeCopy Syntax as ...
, then type the language: e.gphp, js, bash...
- Press
F1
in VSCode, typeext install
and then look forcopy-syntax
. python
is required bypygmentize
-
copy-syntax.defaults.lang
: the default language isjs
-
copy-syntax.defaults.format
: currently is only supportrtf
, feel free to PR. -
copy-syntax.showMessage
: set tofalse
to skip boring success message -
copy-syntax.formatters.rtf
: RtfFormatter optionsfonsize
is specified in half points. The default is 24 half-points, giving a size 12 font.- see http://pygments.org/docs/formatters/#RtfFormatter
{ "copy-syntax.defaults.lang": "js", "copy-syntax.showMessage": false, "copy-syntax.formatters.rtf": { "style": "default", "fontsize": 24, "fontface": "Monaco" } }
Submit the issues if you find any bug or have any suggestion.
Fork the repository and submit pull requests.
see CHANGELOG