HL : Add bash colorisation (basic)
This commit is contained in:
parent
f5911d5463
commit
0eeb214369
@ -109,6 +109,11 @@ void HighlightManager::loadLanguages(void)
|
||||
myHightline = new Highlight(xmlFilename);
|
||||
listHighlight.PushBack(myHightline);
|
||||
|
||||
myHightline->Display();
|
||||
xmlFilename = homedir;
|
||||
xmlFilename += "lang_bash.xml";
|
||||
myHightline = new Highlight(xmlFilename);
|
||||
listHighlight.PushBack(myHightline);
|
||||
|
||||
//myHightline->Display();
|
||||
}
|
||||
|
||||
|
@ -25,10 +25,6 @@
|
||||
* 0.2.X :
|
||||
- gui : Demander la création de nouveaux fichier quand il n'existe pas (a l'ouverture en ligne de commande)
|
||||
- sys : Mise en place des colorisation de base pour le
|
||||
* makefiles
|
||||
* script bash
|
||||
* python
|
||||
* matlab
|
||||
* java script
|
||||
* SQL
|
||||
- gui : ascenceur quand nécessaire
|
||||
|
48
data/lang_bash.xml
Normal file
48
data/lang_bash.xml
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="c">
|
||||
<ext>*.sh</ext>
|
||||
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
|
||||
<rule name="first line">
|
||||
<color>commentDoxygen</color>
|
||||
<start>#!</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="comment line">
|
||||
<color>comment</color>
|
||||
<start>#</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="doubleQuteText">
|
||||
<color>doubleQuoteText</color>
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="simpleQuteText">
|
||||
<color>doubleQuoteText</color>
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
<!--<EscapeChar>\</EscapeChar>-->
|
||||
</rule>
|
||||
</pass1>
|
||||
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
|
||||
<rule name="my keyword">
|
||||
<color>keyword</color>
|
||||
<start>\@for|done|do|while|in|if|then|else|fi\@</start>
|
||||
</rule>
|
||||
<rule name="my Variable">
|
||||
<color>keyword</color>
|
||||
<start>[\$]+[a-zA-Z_][a-zA-Z0-9_]*</start>
|
||||
</rule>
|
||||
<rule name="Function name">
|
||||
<color>functionName</color>
|
||||
<start>function (\w|_)+[ \t]*\(</start>
|
||||
</rule>
|
||||
<rule name="condition">
|
||||
<color>boolean</color>
|
||||
<start>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}|</start>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
Loading…
x
Reference in New Issue
Block a user