Gedit » History » Version 2
iri, 09/24/2012 09:09 PM
1 | 1 | iri | h1. Gedit |
---|---|---|---|
2 | |||
3 | "Gedit":http://projects.gnome.org/gedit/ is the official text editor of the GNOME desktop environment. Other systems like MS Windows are also supported. |
||
4 | |||
5 | h2. The syntax highlighting |
||
6 | |||
7 | * Download this archive : "language-specs.tar.gz":http://www.irizone.net//dl/gtksv/language-specs.tar.gz |
||
8 | 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). |
||
9 | * To install them on GNU/Linux, extract the archive : @tar -zxvf language-specs.tar.gz@ |
||
10 | * To install them on MS Windows, extract the archive |
||
11 | * Copy all files in /usr/share/gtksourceview-2.0/language-specs (GNU/Linux): |
||
12 | <pre> |
||
13 | cd repertoire/language-specs |
||
14 | mv *.lang /usr/share/gtksourceview-2.0/language-specs |
||
15 | </pre> |
||
16 | or _gtksourceview-3.0_ if you use Gnome3. |
||
17 | If you want to install to one user only : |
||
18 | <pre> |
||
19 | cd repertoire/language-specs |
||
20 | mv *.lang .local/share/gtksourceview-3.0/language-specs |
||
21 | </pre> |
||
22 | * Copy all files in \%AppInstall%\share\gtksourceview-2.0\language-specs (MS Windows) |
||
23 | where _\%AppInstall%\_ is the install directory of Gedit, by default 'C:\Program Files\gedit\'. |
||
24 | * Copy all files in -\gtksourceview-2.0\language-specs (MacOSX) |
||
25 | |||
26 | h2. Scol reference |
||
27 | |||
28 | 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. |
||
29 | |||
30 | To install it, |
||
31 | |||
32 | # download the archive "scolreference.tar.gz":http://www.irizone.net//dl/gnome/gedit/scolreference.tar.gz |
||
33 | # extract _scolreference.gedit-plugin_ and _scolreference.py_ files |
||
34 | # on GNU/Linux, copy them in |
||
35 | @/usr/share/gedit-2/plugins/@ |
||
36 | or, for one user only, in |
||
37 | @/home/login_user/.gnome2/gedit/plugins/@ |
||
38 | # on MS Windows, copy them in |
||
39 | @%INSTALL_PATH%/lib/gedit-2/plugins/@ |
||
40 | where _\%AppInstall%\_ is the install directory of Gedit, by default 'C:\Program Files\gedit\'. Gedit 2.29 or + is required on MS Windows. |
||
41 | # Launch Gedit. Go to _Edition_ menu and choose _Preferences_. |
||
42 | # 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. |
||
43 | |||
44 | h2. Scol completion |
||
45 | |||
46 | 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. |
||
47 | |||
48 | To install it : |
||
49 | |||
50 | # Download the "scolcompletion.tar.gz":http://www.irizone.net//dl/gnome/gedit/scolcompletion.tar.gz file |
||
51 | # Extract the archive |
||
52 | # on GNU/Linux, copy _scolcompletion.py_ and _scolcompletion.gedit-plugin_ files in |
||
53 | @/usr/share/gedit-2/plugins/@ |
||
54 | or, for one user only, in |
||
55 | @/home/login_user/.gnome2/gedit/plugins/@ |
||
56 | # on MS Windows, copy _scolcompletion.py_ and _scolcompletion.gedit-plugin_ files in |
||
57 | @%INSTALL_PATH%/lib/gedit-2/plugins/@ |
||
58 | where _\%AppInstall%\_ is the install directory of Gedit, by default 'C:\Program Files\gedit\'. Gedit 2.29 or + is required on MS Windows. |
||
59 | # Copy the _scolcompletion_ folder in the same directory (on GNU/Linux) or in %INSTALL_PATH%/share/gedit-2/plugins/ on MS Windows. |
||
60 | # Launch Gedit. Go to _Edition_ menu and choose _Preferences_. |
||
61 | # 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. |
||
62 | |||
63 | h2. Help Scol function |
||
64 | |||
65 | This plugin opens automatically the help page of the selected function (selection from your source file) |
||
66 | 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. |
||
67 | This plugin does *not* work on MS Windows. |
||
68 | |||
69 | In /home/your_login/.gnome2/gedit/tools directoy, create the file _help-scol-function_ (it must be executable) |
||
70 | Edit it and add this : |
||
71 | <pre> |
||
72 | #!/bin/bash |
||
73 | # [Gedit Tool] |
||
74 | # Comment=Opens the help page of any Scol function in your browser |
||
75 | # Name=Help Scol Function |
||
76 | # Shortcut=F11 |
||
77 | # Applicability=all |
||
78 | # Output=output-panel |
||
79 | # Input=selection |
||
80 | |||
81 | # Copyright (C) 2010 Stéphane Bisaro, aka iri |
||
82 | # More informations available on : http:/www.irizone.net |
||
83 | |||
84 | BASEURL='http://www.scolring.org/files/doc_html/' |
||
85 | SUFFIXE='.html' |
||
86 | read fun |
||
87 | xdg-open ${BASEURL}$(echo $fun | tr 'A-Z' 'a-z')${SUFFIXE} |
||
88 | </pre> |
||
89 | |||
90 | You can change the shortcut if you want. Relaunch Gedit, if any. |
||
91 | |||
92 | h2. Scol script launcher |
||
93 | |||
94 | Scol Script Launcher allows you to launch a launcher (.scol) from Gedit. |
||
95 | It opens a Scol VM, loads and runs the application. Press on CTRL+F12 to launch. This plugin does *not* work on MS Windows. |
||
96 | |||
97 | In the /home/votre_login/.gnome2/gedit/tools directory, create a file named _scol-script-launcher_ (it must be executable). |
||
98 | Edit it and add thes lines : |
||
99 | |||
100 | <pre> |
||
101 | #!/bin/bash |
||
102 | # [Gedit Tool] |
||
103 | # Comment=Run Scol script |
||
104 | # Name=Scol Script Launcher |
||
105 | # Shortcut=<Control>F12 |
||
106 | # Applicability=local |
||
107 | # Output=output-panel |
||
108 | # Input=document |
||
109 | |||
110 | # Copyright (C) 2010 Stéphane Bisaro, aka iri <iri AT irizone.net> |
||
111 | # More informations available on : http://solutions.irizone.net |
||
112 | |||
113 | SUFFIXE='scol' |
||
114 | CMDPATH=$HOME'/scol' |
||
115 | BOOL=0 |
||
116 | |||
117 | for uri in $GEDIT_DOCUMENTS_URI |
||
118 | do |
||
119 | bname=$(basename $uri) |
||
120 | ext=${bname##*.} |
||
121 | # name=${bname%.*} |
||
122 | if [ $ext = $SUFFIXE ] |
||
123 | then |
||
124 | BOOL=1 |
||
125 | pscol=${uri#*partition/} |
||
126 | cmd=${CMDPATH}${pscol} |
||
127 | $cmd |
||
128 | fi |
||
129 | done |
||
130 | |||
131 | if [ $BOOL = 0 ] |
||
132 | then |
||
133 | echo 'no scol script found' |
||
134 | exit 1 |
||
135 | fi |
||
136 | exit 0 |
||
137 | </pre> |
||
138 | 2 | iri | |
139 | !http://www.irizone.net/img/app_gedit_lang_screen2.png! |