Source plug-in. Highlight source code

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

Download (version 1.14.5)
Required OutWiker version: 1.8.1 or 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

source_scr_dialog_1.png: 561x268, 23k (12.08.2013 09:38)
source_scr_dialog_2.png: 561x268, 23k (12.08.2013 09:38)
source_scr_params.png: 802x527, 53k (12.08.2013 09:38)

Version history

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 (29.05.2016)

  • Bug fixes.

1.14 (11.02.2016)

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

1.13 (03.06.2015)

  • Bug fixes.

1.12 (09.02.2015)

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

1.11.5 (20.01.2015)

  • Minor interface improvements.
  • Bug fixes.

1.11.3 (11.09.2014)

  • Bug fixes.

1.11.2 (13.07.2014)

  • Small fixes in the interface.

1.11.1 (17.03.2014)

  • Fixed coloring code in 1S language.

1.11 (09.01.2014)

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

1.10 (12.08.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 (18.02.2013)

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

1.8 (19.01.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 (04.01.2013)

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

1.6 (01.08.2012)

  • Added 1S language supporting.

1.0

  • The first version.


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 349