Install gtksourceview2 on Windows and Linux for Source View plugin

Rohan Verma edited this page Jul 26, 2016 · 5 revisions
Clone this wiki locally

Installation Windows

This chapter describes the installation of the gtksourceview2 on Windows which is required to use the "Source View" (Codeblokken) plugin.

Note: gtksourceview2 is currently not available in the Windows Release 0.62 Release 0.63 for Windows includes GtkSourceView.

A workaround is to install:

  • Python
  • A PyGTK package which includes the gtksourceview2
  • Zim full source.

Installation steps:

  1. Download and install Python 2:
  2. Download and install PyGTK all in one with PyGtkSourceView2:
  3. Extract the Zim full source into C:\Program Files (x86)\zim-0.62:
  4. Create a new shortcut, or start Zim from the command prompt:
    • C:\Python27\pythonw.exe "C:\Program Files (x86)\zim-0.62\"
  5. Goto chapter "Source View plugin usage" below.

Installation Linux

This chapter describes the gtksourceview2 installation on Linux.

  1. Download and install Zim:
  2. Run in in command prompt:
    • Debian: $ sudo apt-get install python-gtksourceview2
    • Fedora: $ sudo dnf install pygtksourceview
  3. Start Zim:
    • $ zim

Source View plugin usage

  1. Enable the Source View plugin:
    • Edit > Preferences > Plugins > Check: Source View > OK
    • Note: The installation was not successful when Source View is grayed out and gtksourciew2 red colored.
  2. Insert a new code block:
    • Insert > Code Block
    • Set a language
    • Enter your source code