Source plug-in. Highlight source code | jenyay.net

Source plug-in. Highlight source code

Plug-in append command (:source:) in wiki parser.

Source 1.28.1 (Required OutWiker version: 4.0.0.942 and above)

Source 1.28 (Required OutWiker version: 3.3.0.934 and above)

Source 1.26 (Required OutWiker version: 3.2.0.922 and above)

Using

(:source params... :)
source code
(:sourceend:)

Params

lang - programming language
tabwidth - tab size
file - attached source file
encoding - encoding of the attached source file (default encoding - utf8)
style - style of hightlighting
parentbg - use the page background for the code block
linenum - enable line numbers

Example 1

CodeResult

Example 2

CodeResult

Example 3

CodeResult

Example 4

CodeResult

Example 5

Insert the cource code from the attached file by specifying the encoding. Prefix Attach: in the parameter file can be omitted.

(:source file="Attach:example.cs" encoding="cp1251":)(:sourceend:)

Example 6

Insert the source code from the attached file and explicitly specified language. The default encoding is UTF-8.

(:source file="Attach:example.txt" lang="python":)(:sourceend:)

Style examples

Default style
Style emacs:
Style vim:
Style colorful:

Screenshots

Versions history

1.28.1 (September 14, 2024)

  • Migrate to new API.

1.28 (June 22, 2024)

  • Update Pygments library.

1.27 (January 27, 2024)

  • Use new API for settings.

1.26 (December 24, 2023)

  • Update Pygments library.

1.25 (May 03, 2023)

  • Migrate to new API.

1.24 (December 11, 2022)

  • Update Pygments library.

1.23 (August 03, 2022)

  • Added the ability to select attachments in nested folders with the dialog.
  • Update Pygments library.

1.22 (February 19, 2022)

  • Update Pygments library.

1.21 (April 07, 2021)

  • Update Pygments library.

1.20 (December 29, 2020)

  • Update Pygments library.

1.19 (February 23, 2020)

  • Update Pygments library.

1.18 (October 19, 2019)

  • Migrate to new API.

1.17.2 (May 26, 2019)

  • Update Pygments library.

1.17.1 (March 22, 2019)

  • Update the Ukrainian localization.
  • Update the German localization.

1.17 (November 24, 2018)

  • Improve programming languages view.
  • Fix errors.

1.16 (August 26, 2018)

  • Add German localization.

1.15.1 (May 26, 2018)

  • Bug fixes.

1.15 (February 15, 2018)

  • Add OutWiker 2.1 support. Migrate to Python 3.6.

1.14.5 (May 28, 2017)

  • Fixed errors.

1.14.4 (March 18, 2017)

  • Updated the Pygments library.

1.14.3 (October 17, 2016)

  • Added OutWiker 2.0 supporting.

1.14.2 (August 20, 2016)

  • Added the Swedish translation.
  • Updated Pygments library.

1.14.1 (May 29, 2016)

  • Bug fixes.

1.14 (February 11, 2016)

  • Bug fixes.
  • Updated Pygments library.
  • Added new styles.
  • Added new programming languages supporting.

1.13 (June 03, 2015)

  • Bug fixes.

1.12 (February 09, 2015)

  • Updated the Pygments library..
  • Added new styles.
  • Added new languages supporting.

1.11.5 (January 20, 2015)

  • Minor interface improvements.
  • Bug fixes.

1.11.3 (September 11, 2014)

  • Bug fixes.

1.11.2 (July 13, 2014)

  • Small fixes in the interface.

1.11.1 (March 17, 2014)

  • Fix highlight for 1C language.

1.11 (January 09, 2014)

  • When using OutWiker 1.8 you can set a hotkey to insert (:source:) command.

1.10 (August 12, 2013)

  • Added the linenum parameter to enable line numbers.
  • Added the parentbg parameter to use as a background source page's background.
  • Improved display of source code on pages with dark backgrounds.

1.9 (February 18, 2013)

  • Added the ability to choose the style of decoration.
  • Corrections in the dialog of the insert commands (:source:).

1.8 (January 19, 2013)

  • Added ability to insert text programs from the attached files.
  • Added parameter encoding, indicated the encoding of the file with the source.

1.7 (January 04, 2013)

  • Added the dialog for insert the command (:source:).

1.6 (August 01, 2012)

  • Added 1S language supporting.


nnsense 03.05.2013 - 18:35

Missing Languages

I'm missing vbscript dedicated highlight (vb.net works as well but lack of some command for vbs like wscript.echo), dos command and linux bash.
Maybe in future? ;)

Jenyay 06.05.2013 - 12:01

Open the plugin settings. There you can add more languages​​.


Subscribe
Name:
Title:
 Comment
 
 
Enter code 867