Project

General

Profile

Actions

Gedit

Gedit is the official text editor of the GNOME desktop environment. Other systems like MS Windows are also supported.

The syntax highlighting

  • Download this archive : language-specs.tar.gz
    The following files are supported : *.scol and *.scm (launcher), *.pkg (package), *.dmc (SCS), *.dms (file descriptor for DMS application), *m3d (legacy 3d Scol engine). The new 3d descriptor files are already supported by Gedit (xml).
  • To install them on GNU/Linux, extract the archive :
    tar -zxvf language-specs.tar.gz
  • To install them on MS Windows, extract the archive
  • Copy all files in /usr/share/gtksourceview-2.0/language-specs (GNU/Linux):
    cd repertoire/language-specs
    mv *.lang /usr/share/gtksourceview-2.0/language-specs
    

    or gtksourceview-3.0 if you use Gnome3.
    If you want to install to one user only :
    cd repertoire/language-specs
    mv *.lang .local/share/gtksourceview-3.0/language-specs
    
  • Copy all files in \%AppInstall%\share\gtksourceview-2.0\language-specs (MS Windows)
    where \%AppInstall%\ is the install directory of Gedit, by default 'C:\Program Files\gedit\'.
  • Copy all files in -\gtksourceview-2.0\language-specs (MacOSX)

Scol reference

The ScolReference is a plugin. It adds an item of the Help menu to access easily to the official reference of the Scol language. This plugin is under GNU GPL2.0 license.

To install it,

  1. download the archive scolreference.tar.gz
  2. extract scolreference.gedit-plugin and scolreference.py files
  3. on GNU/Linux, copy them in
    /usr/share/gedit-2/plugins/
    or, for one user only, in
    /home/login_user/.gnome2/gedit/plugins/
  4. on MS Windows, copy them in
    %INSTALL_PATH%/lib/gedit-2/plugins/
    where \%AppInstall%\ is the install directory of Gedit, by default 'C:\Program Files\gedit\'. Gedit 2.29 or + is required on MS Windows.
  5. Launch Gedit. Go to Edition menu and choose Preferences.
  6. Select the Addons tab. Check "Scol Language Reference 1.00". Note : you can change the default url by clicking on the Configuration button. Save your choice.

Scol completion

The code completion is provided by this plugin. If you want, it can give you the full typing of the Scol functions. It is under GNU GPL 2 license.

To install it :

  1. Download the scolcompletion.tar.gz file
  2. Extract the archive
  3. on GNU/Linux, copy scolcompletion.py and scolcompletion.gedit-plugin files in
    /usr/share/gedit-2/plugins/
    or, for one user only, in
    /home/login_user/.gnome2/gedit/plugins/
  4. on MS Windows, copy scolcompletion.py and scolcompletion.gedit-plugin files in
    %INSTALL_PATH%/lib/gedit-2/plugins/
    where \%AppInstall%\ is the install directory of Gedit, by default 'C:\Program Files\gedit\'. Gedit 2.29 or + is required on MS Windows.
  5. Copy the scolcompletion folder in the same directory (on GNU/Linux) or in INSTALL_PATH/share/gedit-2/plugins/ on MS Windows.
  6. Launch Gedit. Go to Edition menu and choose Preferences.
  7. Select the Addons tab. Check "Scol Completion 1.00". Note : you can change the default url by clicking on the Configuration button. Save your choice.

Help Scol function

This plugin opens automatically the help page of the selected function (selection from your source file)
By exemple, select any Scol function like _ADDlist or _CRwindow and press simultaneously on CTRL and F11. The help page will open in your web browser.
This plugin does not work on MS Windows.

In /home/your_login/.gnome2/gedit/tools directoy, create the file help-scol-function (it must be executable)
Edit it and add this :

#!/bin/bash
# [Gedit Tool]
# Comment=Opens the help page of any Scol function in your browser
# Name=Help Scol Function
# Shortcut=F11
# Applicability=all
# Output=output-panel
# Input=selection

# Copyright (C) 2010 Stéphane Bisaro, aka iri 
# More informations available on : http:/www.irizone.net

BASEURL='http://www.scolring.org/files/doc_html/'
SUFFIXE='.html'
read fun
xdg-open ${BASEURL}$(echo $fun | tr 'A-Z' 'a-z')${SUFFIXE}

You can change the shortcut if you want. Relaunch Gedit, if any.

Scol script launcher

Scol Script Launcher allows you to launch a launcher (.scol) from Gedit.
It opens a Scol VM, loads and runs the application. Press on CTRL+F12 to launch. This plugin does not work on MS Windows.

In the /home/votre_login/.gnome2/gedit/tools directory, create a file named scol-script-launcher (it must be executable).
Edit it and add thes lines :

#!/bin/bash
# [Gedit Tool]
# Comment=Run Scol script
# Name=Scol Script Launcher
# Shortcut=<Control>F12
# Applicability=local
# Output=output-panel
# Input=document

# Copyright (C) 2010 Stéphane Bisaro, aka iri <iri AT irizone.net>
# More informations available on : http://solutions.irizone.net

SUFFIXE='scol'
CMDPATH=$HOME'/scol'
BOOL=0

for uri in $GEDIT_DOCUMENTS_URI
do
    bname=$(basename $uri)
    ext=${bname##*.}
    # name=${bname%.*}
    if [ $ext = $SUFFIXE ]
    then
        BOOL=1
        pscol=${uri#*partition/}
        cmd=${CMDPATH}${pscol}
        $cmd
    fi    
done    

if [ $BOOL = 0 ]
then
    echo 'no scol script found'
    exit 1
fi
exit 0

Updated by iri about 12 years ago · 3 revisions