PowerShell/Personnalisation

Aller à la navigation Aller à la recherche

Quelques éléments de personnalisation

PowerShell ISE

L'interface PowerShell ISE peut être personnalisée concernant l'affichage (menu Outils > Options ; onglet "couleurs et polices") :

  • thème :
    • console foncée, éditeur clair (par défaut),
    • console claire, éditeur foncé,
    • console foncée, éditeur foncé,
    • console claire, éditeur clair,
    • vert monochrome,
    • présentation.

Console foncée, éditeur foncé

Avec "jetons du volet de script"

Elément PowerShell ISE
couleur (hexadécimal)
Nom de la couleur
Arrière-plan    #012456 Couleur personnalisée
Attribut    #b0c4de Bleu acier clair
Commande    #e0ffff Cyan clair
Argument de commande    #ee82ee Violet
Paramètre de commande    #ffe4b5 Beige mocassin
Commentaire    #98fb98 Vert pâle
Fin de groupe    #f5f5f5 Blanc fumée
Début de groupe    #f5f5f5 Blanc fumée
Mot clé    #0effff Cyan clair
Continuation de ligne (accent grave)    #f5f5f5 Blanc fumée
Etiquette de boucle    #0effff Cyan clair
Membre    #f5f5f5 Blanc fumée
Numéro    #ffe4c4 Beige bisque
Opérateur    #d3d3d3 Gris clair
Séparateur d'instruction (point-virgule)    #f5f5f5 Blanc fumée
Chaîne    #db7093 Cristal violet pâle
Type    #8fbc8f Vert marin foncé
Variable    #ff4500 Orangé
vs2015
Classe CSS Couleur (hexadécimal) Nouvelle couleur
.hljs    #1E1E1E    #012456
.hljs-keyword, .hljs-literal, .hljs-symbol, .hljs-name    #569CD6    #ffe4b5
.hljs-link    #569CD6    #ffe4b5
.hljs-built_in, .hljs-type    #4EC9B0    #e0ffff
.hljs-comment, .hljs-quote    #57a64a    #98fb98
.hljs-variable, .hljs-template-variable    #BD63C5    #ff4500
.hljs-attr, .hljs-attribute    #9CDCFE    #b0c4de
.hljs-string, .hljs-meta .hljs-string    #D69D85    ##D69D85
.hljs-number, .hljs-class    #B8D7A3    #ffe4c4
Style Couleur (hexadécimal) Nouvelle couleur
bgcolor    #2B0F01    #012456
DEFAULT    #B7975D    #012456
COMMENT    #208008    #98fb98
STRING    #BCBB80    #ffe4b5
CHARACTER    #BCBB80    #e0ffff
NUMBER    #AFA7D6    #98fb98
VARIABLE    #CFBA28    #ff4500
OPERATOR    #D6C479    #b0c4de
INSTRUCTION WORD    #4AD231    #D69D85
CMDLET    #0088CE    #e0ffff
ALIAS    #D92B10    #ffe4c4
COMMENT STREAM    #208008    #ffe4c4

Fichier paramètre de style :

  • C:\Users\phil\AppData\Roaming\Notepad++\themes\Konophil.xml
        <LexerType name="powershell" desc="PowerShell" ext="">
            <WordsStyle name="DEFAULT" styleID="0" fgColor="F8F8F8" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" />
            <WordsStyle name="COMMENT" styleID="1" fgColor="98FB98" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" />
            <WordsStyle name="STRING" styleID="2" fgColor="FFE4B5" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" />
            <WordsStyle name="CHARACTER" styleID="3" fgColor="E0FFFF" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" />
            <WordsStyle name="NUMBER" styleID="4" fgColor="98FB98" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" />
            <WordsStyle name="VARIABLE" styleID="5" fgColor="FF4500" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="">if else for while</WordsStyle>
            <WordsStyle name="OPERATOR" styleID="6" fgColor="B0C4DE" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="">bool long int char</WordsStyle>
            <WordsStyle name="INSTRUCTION WORD" styleID="7" fgColor="D69D85" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" keywordClass="instre1" />
            <WordsStyle name="CMDLET" styleID="8" fgColor="E0FFFF" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" keywordClass="instre2" />
            <WordsStyle name="ALIAS" styleID="9" fgColor="FFE4C4" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" keywordClass="type1" />
            <WordsStyle name="HERE STRING" styleID="10" fgColor="CC9393" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" />
            <WordsStyle name="HERE CHARACTER" styleID="11" fgColor="CC9393" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" />
            <WordsStyle name="COMMENT STREAM" styleID="12" fgColor="FFE4C4" bgColor="012456" fontName="Lucida Console" fontStyle="0" fontSize="" />
            <WordsStyle name="COMMENT DOC KEYWORD" styleID="13" fgColor="FFE4C4" bgColor="012456" fontName="Lucida Console" fontStyle="1" fontSize="" keywordClass="type4" />
        </LexerType>

MediaWiki et Highlightjs Integration

La hauteur de ligne pour le code a été modifié, via la page MediaWiki:Common.css :

  • avant modification :
    • néant,
  • après modification :
    • .code2highlight {line-height: 1.1em;}

Ajout des langages suivants :

  • apache ;
  • arduino ;
  • css ;
  • dos ;
  • gcode ;
  • groovy ;
  • ini ;
  • javascript ;
  • json ;
  • lua ;
  • php ;
  • powershell ;
  • python ;
  • sql ;
  • vbscript ;
  • xml ;
  • yaml.

Voir aussi

  •