Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Hi,
With Scol, you can use one of these softwares.
* Notepad++ : http://notepad-plus.sourceforge.net/
MS Windows only !
- - Highlighting :
Edit the file %AppData%\Notepad++\userDefineLang.xml and add these lines :
<NotepadPlus>
<UserLang name='Scol' ext='pkg'>
<Settings>
<Global caseIgnored='no' />
<TreatAsSymbol comment='no' commentLine='no' />
<Prefix words1='no' words2='no' words3='no' words4='no' />
</Settings>
<KeywordLists>
<Keywords name='Delimiters'>'00'00</Keywords>
<Keywords name='Folder+'></Keywords>
<Keywords name='Folder-'></Keywords>
<Keywords name='Operators'></Keywords>
<Keywords name='Comment'>1/* 2*/ 0//</Keywords>
<Keywords name='Words1'>fun typeof typedef var struct proto defcom ;;</Keywords>
<Keywords name='Words2'>set let -> <- mutate in</Keywords>
<Keywords name='Words3'>if else then while do</Keywords>
<Keywords name='Words4'></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name='DEFAULT' styleID='11' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='FOLDEROPEN' styleID='12' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='FOLDERCLOSE' styleID='13' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='KEYWORD1' styleID='5' fgColor='FF0000' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='KEYWORD2' styleID='6' fgColor='800000' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='KEYWORD3' styleID='7' fgColor='0000FF' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='KEYWORD4' styleID='8' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='COMMENT' styleID='1' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='COMMENT LINE' styleID='2' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='NUMBER' styleID='4' fgColor='FF8040' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='OPERATOR' styleID='10' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER1' styleID='14' fgColor='808080' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER2' styleID='15' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER3' styleID='16' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
</Styles>
</UserLang>
</NotepadPlus>
Save and run Notepad++
-- Auto completion :
Download my file : http://www.irizone.net//dl/others/notep … tepadpp.7z
Extract it in your Notepad++ folder (by default : C:\Program Files\Notepad++ or C:\Programs\Notepad++)
Run Notepad++ and go to Settings > Preferences > Backup / Autocompletion and configure as you want.
* Gedit : http://projects.gnome.org/gedit/
MS Windows and GNU / Linux
-- Highlighting :
Download my file : http://www.irizone.net//dl/gtksv/language-specs.tar.gz
Extract it into and copy *.lang files :
on Windows : \%AppInstall%\share\gtksourceview-2.0\language-specs
on Linux : /usr/share/gtksourceview-2.0/language-specs (you maybe root ...)
For Gedit 3.x (typically on Gnome 3), you should copy *.lang in :
- /usr/share/gtksourceview-3.0/language-specs (you maybe root ...), for all users, or
- ~/.local/share/gtksourceview-3.0/language-specs (in the user directory) for a specific user
-- Plugins :
--- Scolreference : http://www.irizone.net/dl/gnome/gedit/s … nce.tar.gz
Add an menu item (Help) to go to the html online documentation
Download the file and extract it.
Copy the content to /home/login_user/.gnome2/gedit/plugins/ or /usr/share/gedit-2/plugins/
On windows, copy the files to %INSTALL_PATH%/lib/gedit-2/plugins/
--- ScolCompletion : http://www.irizone.net//dl/gnome/gedit/ … ion.tar.gz
Only Scol file (*.pkg)
--- LanguageCompletion : http://www.irizone.net//dl/gnome/gedit/ … ion.tar.gz
awk, c, c++, cmake, css, html, java, lua, perl,php, python, rc, scol, sql
Download and extract it.
Copy the content : ~/.gnome2/gedit/plugins/ or /usr/lib/gedit-2/plugins/
On windows : %INSTALL_PATH%/lib/gedit-2/plugins/
-- Externals tools (Linux only) :
--- Help Scol function :
Open the function help page.
in ~/.gnome2/gedit/tools, create an empty file named help-scol-function
Set it with :
#!/bin/bash
# [Gedit Tool]
# Comment=Opens the help page of any Scol function in your browser
# Name=Help Scol Function
# Shortcut=<Control>F11
# Applicability=all
# Output=output-panel
# Input=selection
# Copyright (C) 2010 Stéphane Bisaro, aka iri <iri AT irizone.net>
# More informations available on : http://solutions.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}
Use : select a function and press to CTRL + F11
--- Scol Script Launcher :
Run a Scol script currently edited in Gedit
In ~/.gnome2/gedit/tools, create an empty file named scol-script-launcher
Set it with :
#!/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
* Bluefish : http://bluefish.openoffice.nl/
MS Windows and GNU / Linux
- Highlighting and auto completion
Download my file and extract it : http://www.irizone.net//dl/others/bluef … ing.tar.gz
Copy the bflang2 to : /usr/local/share/bluefish/bflang/
on Windows : %INSTALL_PATH%/share/bluefish/
To configure, go to the Preferences menu, selection Language and Scol.
* Emacs : http://www.gnu.org/software/emacs/
MS Windows and GNU / Linux
- Highlighting :
Create an empty file 50scol.el in your personal emacs folder and add :
;;; scol.el ---- Major mode for composing Scol files (*.pkg)
;; Author: Stephane Bisaro, aka Iri <iri@irizone.net>
;; Created: 12 Jan 2010
;; Version: 0.1
;; Keywords: Scol major-mode
;; Copyright (C) 2010 Stephane Bisaro
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
;; Installation :
;; add this line in your .emacs (probably in your home directory)
;; (setq auto-mode-alist (cons '(".pkg" . scol-mode) auto-mode-alist))
;;
(defvar scol-mode-hook nil)
(defvar scol-font-lock-keywords-1
(list
'("//.*$" . font-lock-comment-face)
'("\\<[0-9]*\\>" . font-lock-constant-face)
'("\\<fun\\|proto\\|defcom\\|defcomvar\\>" . font-lock-function-name-face)
'("\\<typeof\\|typedef\\|var\\>" . font-lock-variable-name-face)
'("\\<if\\|else\\|then\\|while\\|do\\>" . font-lock-type-face)
'("\\<set\\|let\\|mutate\\|->\\|<-\\|in\\>" . font-lock-keyword-face)
)
"Highlighting for scol mode.")
(defvar scol-font-lock-keywords
scol-font-lock-keywords-1)
(defun scol-indent-line ()
"Indent current line for scol."
(interactive)
(let ((indent 4))
(indent-line-to indent)))
;;;###autoload
(defun scol-mode ()
"Major mode for editing scol (pkg) files."
(interactive)
(kill-all-local-variables)
(set (make-local-variable 'font-lock-defaults)
'(scol-font-lock-keywords
t nil nil nil))
(setq major-mode 'scol-mode)
(setq mode-name "Scol")
(set (make-local-variable 'indent-line-function) 'scol-indent-line)
(run-hooks 'scol-mode-hook))
(provide 'scol-mode)
in your .emacs file, add this line :
(setq auto-mode-alist (cons '(*.pkg' . scol-mode) auto-mode-alist))
* Nano : http://www.nano-editor.org/
GNU / Linux and partially MS Windows
No graphical editor ! You can use it to edit a file to a Scol server.
In /usr/share/nano, create a file named scol.nanorc
Copy these lines :
## Here is an example for Scol/Pkg.
##
syntax "scol" "\.pkg$" "\.scol$"
## Types
color brightred "\<(typeof|var|typedef|defcom|defcomvar|struct|S|I|F|r1|r2|Chn|;;|;|ObjGtkWidget)\>"
## Functions and instructions
color brightred "\<(fun|proto|;|;;)\>"
## Loops and conditions
color brightgreen "\<(if|then|else|while|do)\>"
## Affectations
color brightcyan "\<(set|let|mutate|in|->|<-)\>"
## Strings and numbers
color yellow "<[^= ]*>" ""(\.|[^"])*""
##
## Launchers
color blue "[[:space:]]*_load[[:space:]]*"
## Comment
color green "//.*"
color green start="/\*" end="\*/
Offline
I looked for:
- - Highlighting :
Edit the file %AppData%\Notepad++\userDefineLang.xml and add these lines :
on the machine that I installed notepad ++ on but I couldn't find that file anywhere on my machine. Do I create this file?
Offline
Yes you could create it (in this folder).
You may restart Notepad++ after
-in which folder?
-h
Offline
still not working...but I have bluefish up and running so I'll use that.
Offline
You should already have a folder named "Notepad++". Add the userDefineLang.xml file in this.
Be careful, %AppData% is precise, in Windows and thre is two or three folder "Notepad++" in your system (Program Files is bad in our case)
Offline
In the "Languages" menu, an item « Scol » should be appears at the bottom
The userDefineLang.xml should be in "C:\Users\your_login\AppData\Roaming\Notepad++" folder.
Offline
thx....the problem I am having now is encoding the .sol and .pkg files in ascii format.
Offline
Now that I'm back to scol coding I should really get notepad++ to help me out, but scol isn't appearing in the languages list. Here is my setup:
userDefineLang.xml location:
C:\Users\Daniel Green\AppData\Roaming\Notepad++\userDefineLang.xml
contents of userDefineLang.xml:
<NotepadPlus>
<UserLang name='Scol' ext='pkg'>
<Settings>
<Global caseIgnored='no' />
<TreatAsSymbol comment='no' commentLine='no' />
<Prefix words1='no' words2='no' words3='no' words4='no' />
</Settings>
<KeywordLists>
<Keywords name='Delimiters'>'00'00</Keywords>
<Keywords name='Folder+'></Keywords>
<Keywords name='Folder-'></Keywords>
<Keywords name='Operators'></Keywords>
<Keywords name='Comment'>1/* 2*/ 0//</Keywords>
<Keywords name='Words1'>fun typeof typedef var struct proto defcom ;;</Keywords>
<Keywords name='Words2'>set let -> <- mutate in</Keywords>
<Keywords name='Words3'>if else then while do</Keywords>
<Keywords name='Words4'></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name='DEFAULT' styleID='11' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='FOLDEROPEN' styleID='12' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='FOLDERCLOSE' styleID='13' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='KEYWORD1' styleID='5' fgColor='FF0000' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='KEYWORD2' styleID='6' fgColor='800000' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='KEYWORD3' styleID='7' fgColor='0000FF' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='KEYWORD4' styleID='8' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='COMMENT' styleID='1' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='COMMENT LINE' styleID='2' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='NUMBER' styleID='4' fgColor='FF8040' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='OPERATOR' styleID='10' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER1' styleID='14' fgColor='808080' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER2' styleID='15' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER3' styleID='16' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
</Styles>
</UserLang>
</NotepadPlus>
location of scol.xml:
C:\Program Files (x86)\Notepad++
still scol is not appearing in the languages list. I'm using windows 7 and notepad 5.9.6.1 (released 11/5/2011)
Offline
Hi,
I made this page on the Wiki, please check if the configuration is ok (the same than the wiki) :
http://redmine.scolring.org/projects/tu … e_starting
and upgrade Notepad++, several important changes on the languages supports has been added to 6.x version
Offline
thx Iri I will upgrade and check my setup.
Offline
I upgraded to notepad++ 6.5.1. '
I downloaded the scol.xml file from http://www.irizone.net/dl/others/notepa … tepadpp.7z.
I put scol.xml in:
C:\Program Files (x86)\Notepad++
I put userDefineLang.xml in:
C:\Users\Daniel Green\AppData\Roaming\Notepad++
Here is the content of userDefineLang.xml, copied and pasted from wiki:
<NotepadPlus>
<UserLang name='Scol' ext='pkg'>
<Settings>
<Global caseIgnored='no' />
<TreatAsSymbol comment='no' commentLine='no' />
<Prefix words1='no' words2='no' words3='no' words4='no' />
</Settings>
<KeywordLists>
<Keywords name='Delimiters'>'00'00</Keywords>
<Keywords name='Folder+'></Keywords>
<Keywords name='Folder-'></Keywords>
<Keywords name='Operators'></Keywords>
<Keywords name='Comment'>1/* 2*/ 0//</Keywords>
<Keywords name='Words1'>fun typeof typedef var struct proto defcom exec match with ;;</Keywords>
<Keywords name='Words2'>set let -> <- mutate in</Keywords>
<Keywords name='Words3'>if else then while do</Keywords>
<Keywords name='Words4'></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name='DEFAULT' styleID='11' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='FOLDEROPEN' styleID='12' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='FOLDERCLOSE' styleID='13' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='KEYWORD1' styleID='5' fgColor='FF0000' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='KEYWORD2' styleID='6' fgColor='800000' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='KEYWORD3' styleID='7' fgColor='0000FF' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='KEYWORD4' styleID='8' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='COMMENT' styleID='1' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='COMMENT LINE' styleID='2' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='NUMBER' styleID='4' fgColor='FF8040' bgColor='FFFFFF' fontName='' fontStyle='1' />
<WordsStyle name='OPERATOR' styleID='10' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER1' styleID='14' fgColor='808080' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER2' styleID='15' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
<WordsStyle name='DELIMINER3' styleID='16' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
</Styles>
</UserLang>
</NotepadPlus>
I downloaded fnList.dll from the wiki link and placed it in:
C:\Program Files (x86)\Notepad++\plugins
There is no in FunctionListRules.xml in:
C:\Users\Daniel Green\AppData\Roaming\Notepad++\plugins\config
I still want to make this work at some point, since I'll be posting less code errors to the forum.
Offline
thx Iri
Offline
- For the FunctionList plugin :
Please, verify if, that in "Settings" -> "Language Menu", the checkbox "Make language Menu compact" isn't checked...
If yes, uncheck it and relaunch npp.
Try again !
It should work fine.
- The Scol syntax highlighting is OK ?
Offline
- For the FunctionList plugin :
Please, verify if, that in "Settings" -> "Language Menu", the checkbox "Make language Menu compact" isn't checked...
If yes, uncheck it and relaunch npp.
Try again !It should work fine.
I see the fnList Beta panel but it does not contain any content.
- The Scol syntax highlighting is OK ?
Scol is not in the language list...should it be set to CAML? When I set the language to "user defined", there still is no auto-completion either. Just to be safe I restarted my windows 7 machine and these errors are still occuring.
I am sure there is a reason for this somewhere. Probably something obvious I am not doing, but I cannot figure out what.
Offline
Iri I have gotten bluefish to work....my main worry is handling nested braces for if then else and let in function blocks and bluefish helps remind me about where to put the semi colons. But if notepad has additional code helpers, I'm still interested in using it.
Offline
Indeed, i updated the npp wiki, please read it again.
I see the fnList Beta panel but it does not contain any content.
Be careful, the plugin is "Function List", not "Fn List" !
To know Unicode or Ansi version, select the About Notepad++dialog box. This should be UNICODE.
Scol is not in the language list...should it be set to CAML? When I set the language to "user defined", there still is no auto-completion either. Just to be safe I restarted my windows 7 machine and these errors are still occuring.
Verify the path of the edited userDefineLang.xml file ! And compare its content with the updated wiki.
I am sure there is a reason for this somewhere. Probably something obvious I am not doing, but I cannot figure out what.
The wiki was too imprecise ... I hope I have enough corrected this page.
Offline
Iri I have gotten bluefish to work....my main worry is handling nested braces for if then else and let in function blocks and bluefish helps remind me about where to put the semi colons. But if notepad has additional code helpers, I'm still interested in using it.
Bluefish is a good soft too
For NPP, see my previous post !
Offline
hebdemnobad wrote:Iri I have gotten bluefish to work....my main worry is handling nested braces for if then else and let in function blocks and bluefish helps remind me about where to put the semi colons. But if notepad has additional code helpers, I'm still interested in using it.
Bluefish is a good soft too
For NPP, see my previous post !
Thanks, I will try notepad when I can.
-h
Offline
hi everyone...Iri (Hi! I hope all is well) or Arkeon or anyone else...can you email me this file or post it to redmine:
Offline
nevermind i found the file on one of my backups, but it would be great to have it up at the new redmine location for other users. i can share on request.
Offline