AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to add a new syntax theme
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English)
View previous topic :: View next topic  
Author Message
Run_LeoCat



Joined: 27 Dec 2013
Posts: 3

PostPosted: Fri Dec 27, 2013 7:18 am    Post subject: How to add a new syntax theme Reply with quote

Dear all,

I want to add a syntax theme to AkelPad. (For example, add a syntax theme for SHELL), But, I didn't find the method to add it.

Who can give me a method for this demand?

Thanks. Very Happy
Back to top
View user's profile Send private message
Skif_off



Joined: 20 Oct 2013
Posts: 385

PostPosted: Fri Dec 27, 2013 7:36 am    Post subject: Reply with quote

1 2 3 4
For example sh.coder


Last edited by Skif_off on Thu Jan 02, 2014 7:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
Run_LeoCat



Joined: 27 Dec 2013
Posts: 3

PostPosted: Fri Dec 27, 2013 9:22 am    Post subject: Reply with quote

Skif_off wrote:
1 2 3
For example sh.coder


Thanks a lot. But, I don't know how to use this "coder" file. Just put this file into "Plugs\Coder" directory, or need to do some other operations?

Thanks. Smile
Back to top
View user's profile Send private message
Skif_off



Joined: 20 Oct 2013
Posts: 385

PostPosted: Fri Dec 27, 2013 10:07 am    Post subject: Reply with quote

Run_LeoCat wrote:
Just put this file into "Plugs\Coder" directory

and update cache (if used): remove file "Plugs\Coder\cache" or external call "Call("Coder::Settings", 2)" (see Coder-Eng.txt).
There is the menu items examples at the end of the file "Docs\Coder-Eng.txt" (if you need the menu items).
Back to top
View user's profile Send private message
Run_LeoCat



Joined: 27 Dec 2013
Posts: 3

PostPosted: Fri Dec 27, 2013 4:02 pm    Post subject: Reply with quote

Skif_off wrote:
Run_LeoCat wrote:
Just put this file into "Plugs\Coder" directory

and update cache (if used): remove file "Plugs\Coder\cache" or external call "Call("Coder::Settings", 2)" (see Coder-Eng.txt).
There is the menu items examples at the end of the file "Docs\Coder-Eng.txt" (if you need the menu items).


What a great job!!

Thanks a lot!!! Very Happy
Back to top
View user's profile Send private message
Azev



Joined: 13 Sep 2014
Posts: 20

PostPosted: Sun Sep 21, 2014 2:59 pm    Post subject: Reply with quote

Ok, what about the name? Why it doesn't appear in the context menu even after a reload?



Thanks!
Back to top
View user's profile Send private message
Lenchik



Joined: 10 Jan 2011
Posts: 275

PostPosted: Sun Sep 21, 2014 3:12 pm    Post subject: Reply with quote

Because menu is hardcoded. Or it is default behavior of menu because only these *.coder are provided with Coder plugin.
So you need to put menu item by yourself.
I have done that by putting in ContextMenu::Showmenu of ContextMenu Plugin this:
part of ContextMenu::Showmenu
Code:
"SYNTAXTHEME"
{
  "1" Call("Coder::Settings", 1, "1S") Icon("%a\AkelFiles\Plugs\Toolbar\1S.ico")
  "ActionScript" Call("Coder::Settings", 1, "as") Icon("%a\AkelFiles\Plugs\Toolbar\as.ico")
  "AkelPad menu" Call("Coder::Settings", 1, "akelmenu")
  "Assembler" Call("Coder::Settings", 1, "asm") Icon("%a\AkelFiles\Plugs\Toolbar\asm.ico")
  "AutoHotkey" Call("Coder::Settings", 1, "ahk")  Icon("%a\AkelFiles\Plugs\Toolbar\ahk.ico")
  "AutoIt" Call("Coder::Settings", 1, "au3") Icon("%a\AkelFiles\Plugs\Toolbar\au3.ico")
  "Avisynth" Call("Coder::Settings", 1, "avs") Icon("%a\AkelFiles\Plugs\Toolbar\avisynth.ico")
  "AWK" Call("Coder::Settings", 1, "awk") Icon("%a\AkelFiles\Plugs\Toolbar\awk.ico")
  "Bat/Cmd" Call("Coder::Settings", 1, "bat") Icon("%a\AkelFiles\Plugs\Toolbar\bat.ico")
  "BibTeX" Call("Coder::Settings", 1, "bib") Icon("%a\AkelFiles\Plugs\Toolbar\TeX.ico")
  "BBCode" Call("Coder::Settings", 1, "bbc") Icon("%a\AkelFiles\Plugs\Toolbar\BBCode.ico")
  "C++" Call("Coder::Settings", 1, "cpp") Icon("%a\AkelFiles\Plugs\Coder.dll", 4)
  "Coder Syntax" Call("Coder::Settings", 1, "coder") Icon("%a\AkelFiles\Plugs\Coder.dll", 2)
  "CSS" Call("Coder::Settings", 1, "css") Icon("%a\AkelFiles\Plugs\Toolbar\css.ico")
  "diff" Call("Coder::Settings", 1, "diff")
  "fb2" Call("Coder::Settings", 1, "fb2") Icon("%a\AkelFiles\Plugs\Toolbar\fb2.ico")
  "Fortran" Call("Coder::Settings", 1, "ftn") Icon("%a\AkelFiles\Plugs\Toolbar\for.ico")
  "GRUB4Dos (*.lst)" Call("Coder::Settings", 1, "lst")
  "Hash" Call("Coder::Settings", 1, "md5")
  "HTML" Call("Coder::Settings", 1, "html") Icon("%a\AkelFiles\Plugs\Toolbar\html.ico")
  "Ini" Call("Coder::Settings", 1, "ini") Icon("%a\AkelFiles\Plugs\Toolbar\css.ico")
  "Inno" Call("Coder::Settings", 1, "iss") Icon("%a\AkelFiles\Plugs\Toolbar\iss.ico")
  "Java" Call("Coder::Settings", 1, "java") Icon("%a\AkelFiles\Plugs\Toolbar\java.ico")
  "JScript" Call("Coder::Settings", 1, "js") Icon("%a\AkelFiles\Plugs\Toolbar\js.ico")
  "Kixtart" Call("Coder::Settings", 1, "kix") Icon("%a\AkelFiles\Plugs\Toolbar\kix.ico")
  "LaTeX" Call("Coder::Settings", 1, "tex") Icon("%a\AkelFiles\Plugs\Toolbar\TeX.ico")
  "Log" Call("Coder::Settings", 1, "log")
  "LSS" Call("Coder::Settings", 1, "lss") Icon("%a\AkelFiles\Plugs\Toolbar\lss.ico")
  "Lua" Call("Coder::Settings", 1, "lua") Icon("%a\AkelFiles\Plugs\Toolbar\lua.ico")
  "MaxScript" Call("Coder::Settings", 1, "mcr") Icon("%a\AkelFiles\Plugs\Toolbar\Maxscript.ico")
  "Mnu" Call("Coder::Settings", 1, "mnu") Icon("%a\AkelFiles\Plugs\Toolbar\Mnu.ico")
  "Msg" Call("Coder::Settings", 1, "msg")
  "NNCron" Call("Coder::Settings", 1, "spf")
  "NSIS" Call("Coder::Settings", 1, "nsi") Icon("%a\AkelFiles\Plugs\Toolbar\nsi.ico")
  "Pascal" Call("Coder::Settings", 1, "dpr") Icon("%a\AkelFiles\Plugs\Toolbar\Pascal.ico")
  "Perl" Call("Coder::Settings", 1, "pl")  Icon("%a\AkelFiles\Plugs\Toolbar\Perl.ico")
  "PHP" Call("Coder::Settings", 1, "php") Icon("%a\AkelFiles\Plugs\Toolbar\PHP.ico")
  "Powershell" Call("Coder::Settings", 1, "ps1") Icon("%a\AkelFiles\Plugs\Toolbar\powershell.ico")
  "PRG" Call("Coder::Settings", 1, "prg") Icon("%a\AkelFiles\Plugs\Toolbar\prg.ico")
  "Python" Call("Coder::Settings", 1, "py")  Icon("%a\AkelFiles\Plugs\Toolbar\Python.ico")
  "Resource" Call("Coder::Settings", 1, "rc") Icon("%a\AkelFiles\Plugs\Toolbar\rc.ico")
  "RDF" Call("Coder::Settings", 1, "rdf") Icon("%a\AkelFiles\Plugs\Toolbar\rdf.ico")
  ".scl" Call("Coder::Settings", 1, "scl")
  "Sharp" Call("Coder::Settings", 1, "cs") Icon("%a\AkelFiles\Plugs\Toolbar\Sharp.ico")
  "Smarty" Call("Coder::Settings", 1, "tpl") Icon("%a\AkelFiles\Plugs\Toolbar\smarty.ico")
  "SQL" Call("Coder::Settings", 1, "sql")  Icon("%a\AkelFiles\Plugs\Toolbar\sql.ico")
  "Text" Call("Coder::Settings", 1, "txt") Icon("notepad.exe",0)
  "Unix shell" Call("Coder::Settings", 1, "sh")
  "VB / VBScript" Call("Coder::Settings", 1, "vbs") Icon("%a\AkelFiles\Plugs\Toolbar\vbs.ico")
  "XBL" Call("Coder::Settings", 1, "xbl")
  "XML / DXL" Call("Coder::Settings", 1, "xml") Icon("%a\AkelFiles\Plugs\Toolbar\xml.ico")
  "XUL" Call("Coder::Settings", 1, "xul") Icon("%a\AkelFiles\Plugs\Toolbar\xul.ico")
  SEPARATOR
 "No filetype" Call("Coder::Settings", 1, "?")
}

and then in Edit Menu:

Code:
"Syntax theme" Menu("SYNTAXTHEME") Icon("%a\AkelFiles\Plugs\Coder.dll", 4)
Back to top
View user's profile Send private message Visit poster's website
Azev



Joined: 13 Sep 2014
Posts: 20

PostPosted: Sun Sep 21, 2014 4:09 pm    Post subject: Reply with quote

I have the context menu dll plugin installed but I don't know how to configure it!

The .coder file should have an entry like:
Code:

Files:
;==========
;File types
;==========
*.ahk

CoderName: <----
AutoHotkey


So new entries could be added to context menu without further work and not depend on others plugins.
Back to top
View user's profile Send private message
Lenchik



Joined: 10 Jan 2011
Posts: 275

PostPosted: Sun Sep 21, 2014 4:54 pm    Post subject: Reply with quote

Plugins have documentations in english *.txt files. You should read them to understand how to configure plugins to work the way you like.

Your suggestion you should put in topic with suggestions: http://akelpad.sourceforge.net/forum/viewtopic.php?t=829

Also, you can read manual for scripts plugin and create a script for Akelpad community, that can be autoloaded and will be modifying menus as you described.
Back to top
View user's profile Send private message Visit poster's website
Azev



Joined: 13 Sep 2014
Posts: 20

PostPosted: Sun Sep 21, 2014 7:02 pm    Post subject: Reply with quote

Thank you!
Worked!

I'm getting familiar with AkelPad. I'm coming from Np++.
I'll get to know it better and soon I'll be contributing with some code.

I just thought of "log.coder" with the keywords:
'error', 'fail', 'update', 'new', DD/MM/YYY, HH:MM:SS, 'created', 'creating', 'exist', ...
I'll get to it.


One detail...
When loading ahk.loader it gives an error message:
"Contatin Unknown section name "CompleteList"


Code:
;----------------------------------------------;
;                 AutoComplete                 ;
;----------------------------------------------;

CompleteList:
;=======================
;ListFontStyle                ListFontSize                 ListFaceName                 ListLineGap                 ListBlockIcon                 ListBlockIconMargins "left;right"    ListHlBaseIcon                 ListHlBaseIconMargins "left;right"    ListDocWordIcon                 ListDocWordIconMargins "left;right"    ListBasicTextColor                 ListBasicBkColor                 ListSelTextColor                 ListSelBkColor
;=======================
${AutoComplete_ListBlockIcon} ${AutoComplete_ListBlockIconMargins} ${AutoComplete_ListHlBaseIcon} ${AutoComplete_ListHlBaseIconMargins} ${AutoComplete_ListDocWordIcon} ${AutoComplete_ListDocWordIconMargins} ${AutoComplete_ListBasicTextColor} ${AutoComplete_ListBasicBkColor} ${AutoComplete_ListSelTextColor} ${AutoComplete_ListSelBkColor}
Back to top
View user's profile Send private message
Lenchik



Joined: 10 Jan 2011
Posts: 275

PostPosted: Sun Sep 21, 2014 7:10 pm    Post subject: Reply with quote

There is one log.coder that can be easily modified to work with standard coloring themes.

Latest version of Coder plugin introduced this new section.
Back to top
View user's profile Send private message Visit poster's website
Azev



Joined: 13 Sep 2014
Posts: 20

PostPosted: Sun Sep 21, 2014 7:35 pm    Post subject: Reply with quote

Thanks once again!

I updated the plugin and now it gives me lot of error messages regarding .coder files. Even after updating all the .coder files and the plugin.




I can't get anything from this thread as it is in RUS:
http://akelpad.sourceforge.net/forum/viewtopic.php?t=1495&postdays=0&postorder=asc&start=915
Back to top
View user's profile Send private message
Lenchik



Joined: 10 Jan 2011
Posts: 275

PostPosted: Sun Sep 21, 2014 7:46 pm    Post subject: Reply with quote

Use google translate and probably http://akelpad.sourceforge.net/forum/viewtopic.php?p=25908#25908 will be of help in mass update of your custom theme (named "test" in case of your screenshot).
Back to top
View user's profile Send private message Visit poster's website
Drugmix



Joined: 08 Apr 2013
Posts: 446

PostPosted: Mon Sep 22, 2014 10:11 am    Post subject: Reply with quote

Azev wrote:

Means you've created a new color scheme named "test" and didn't add some widely used in .coder files variables and values (color+font style) to them.
Or you may just switch back to a standard theme.

Azev wrote:
I can't get anything from this thread as it is in RUS:
http://akelpad.sourceforge.net/forum/viewtopic.php?t=1495&postdays=0&postorder=asc&start=915

Feel free to ask any questions in english in that topic and in the others in .
Back to top
View user's profile Send private message
zeha



Joined: 23 Sep 2014
Posts: 1

PostPosted: Tue Sep 23, 2014 2:41 pm    Post subject: Reply with quote

Lenchik wrote:
So you need to put menu item by yourself.
I have done that by putting in ContextMenu::Showmenu of ContextMenu Plugin this:
part of ContextMenu::Showmenu
Code:
"SYNTAXTHEME"
{
  "1" Call("Coder::Settings", 1, "1S") Icon("%a\AkelFiles\Plugs\Toolbar\1S.ico")
  "ActionScript" Call("Coder::Settings", 1, "as") Icon("%a\AkelFiles\Plugs\Toolbar\as.ico")
  "AkelPad menu" Call("Coder::Settings", 1, "akelmenu")
  "Assembler" Call("Coder::Settings", 1, "asm") Icon("%a\AkelFiles\Plugs\Toolbar\asm.ico")
  "AutoHotkey" Call("Coder::Settings", 1, "ahk")  Icon("%a\AkelFiles\Plugs\Toolbar\ahk.ico")
  "AutoIt" Call("Coder::Settings", 1, "au3") Icon("%a\AkelFiles\Plugs\Toolbar\au3.ico")
  "Avisynth" Call("Coder::Settings", 1, "avs") Icon("%a\AkelFiles\Plugs\Toolbar\avisynth.ico")
  "AWK" Call("Coder::Settings", 1, "awk") Icon("%a\AkelFiles\Plugs\Toolbar\awk.ico")
  "Bat/Cmd" Call("Coder::Settings", 1, "bat") Icon("%a\AkelFiles\Plugs\Toolbar\bat.ico")
  "BibTeX" Call("Coder::Settings", 1, "bib") Icon("%a\AkelFiles\Plugs\Toolbar\TeX.ico")
  "BBCode" Call("Coder::Settings", 1, "bbc") Icon("%a\AkelFiles\Plugs\Toolbar\BBCode.ico")
  "C++" Call("Coder::Settings", 1, "cpp") Icon("%a\AkelFiles\Plugs\Coder.dll", 4)
  "Coder Syntax" Call("Coder::Settings", 1, "coder") Icon("%a\AkelFiles\Plugs\Coder.dll", 2)
  "CSS" Call("Coder::Settings", 1, "css") Icon("%a\AkelFiles\Plugs\Toolbar\css.ico")
  "diff" Call("Coder::Settings", 1, "diff")
  "fb2" Call("Coder::Settings", 1, "fb2") Icon("%a\AkelFiles\Plugs\Toolbar\fb2.ico")
  "Fortran" Call("Coder::Settings", 1, "ftn") Icon("%a\AkelFiles\Plugs\Toolbar\for.ico")
  "GRUB4Dos (*.lst)" Call("Coder::Settings", 1, "lst")
  "Hash" Call("Coder::Settings", 1, "md5")
  "HTML" Call("Coder::Settings", 1, "html") Icon("%a\AkelFiles\Plugs\Toolbar\html.ico")
  "Ini" Call("Coder::Settings", 1, "ini") Icon("%a\AkelFiles\Plugs\Toolbar\css.ico")
  "Inno" Call("Coder::Settings", 1, "iss") Icon("%a\AkelFiles\Plugs\Toolbar\iss.ico")
  "Java" Call("Coder::Settings", 1, "java") Icon("%a\AkelFiles\Plugs\Toolbar\java.ico")
  "JScript" Call("Coder::Settings", 1, "js") Icon("%a\AkelFiles\Plugs\Toolbar\js.ico")
  "Kixtart" Call("Coder::Settings", 1, "kix") Icon("%a\AkelFiles\Plugs\Toolbar\kix.ico")
  "LaTeX" Call("Coder::Settings", 1, "tex") Icon("%a\AkelFiles\Plugs\Toolbar\TeX.ico")
  "Log" Call("Coder::Settings", 1, "log")
  "LSS" Call("Coder::Settings", 1, "lss") Icon("%a\AkelFiles\Plugs\Toolbar\lss.ico")
  "Lua" Call("Coder::Settings", 1, "lua") Icon("%a\AkelFiles\Plugs\Toolbar\lua.ico")
  "MaxScript" Call("Coder::Settings", 1, "mcr") Icon("%a\AkelFiles\Plugs\Toolbar\Maxscript.ico")
  "Mnu" Call("Coder::Settings", 1, "mnu") Icon("%a\AkelFiles\Plugs\Toolbar\Mnu.ico")
  "Msg" Call("Coder::Settings", 1, "msg")
  "NNCron" Call("Coder::Settings", 1, "spf")
  "NSIS" Call("Coder::Settings", 1, "nsi") Icon("%a\AkelFiles\Plugs\Toolbar\nsi.ico")
  "Pascal" Call("Coder::Settings", 1, "dpr") Icon("%a\AkelFiles\Plugs\Toolbar\Pascal.ico")
  "Perl" Call("Coder::Settings", 1, "pl")  Icon("%a\AkelFiles\Plugs\Toolbar\Perl.ico")
  "PHP" Call("Coder::Settings", 1, "php") Icon("%a\AkelFiles\Plugs\Toolbar\PHP.ico")
  "Powershell" Call("Coder::Settings", 1, "ps1") Icon("%a\AkelFiles\Plugs\Toolbar\powershell.ico")
  "PRG" Call("Coder::Settings", 1, "prg") Icon("%a\AkelFiles\Plugs\Toolbar\prg.ico")
  "Python" Call("Coder::Settings", 1, "py")  Icon("%a\AkelFiles\Plugs\Toolbar\Python.ico")
  "Resource" Call("Coder::Settings", 1, "rc") Icon("%a\AkelFiles\Plugs\Toolbar\rc.ico")
  "RDF" Call("Coder::Settings", 1, "rdf") Icon("%a\AkelFiles\Plugs\Toolbar\rdf.ico")
  ".scl" Call("Coder::Settings", 1, "scl")
  "Sharp" Call("Coder::Settings", 1, "cs") Icon("%a\AkelFiles\Plugs\Toolbar\Sharp.ico")
  "Smarty" Call("Coder::Settings", 1, "tpl") Icon("%a\AkelFiles\Plugs\Toolbar\smarty.ico")
  "SQL" Call("Coder::Settings", 1, "sql")  Icon("%a\AkelFiles\Plugs\Toolbar\sql.ico")
  "Text" Call("Coder::Settings", 1, "txt") Icon("notepad.exe",0)
  "Unix shell" Call("Coder::Settings", 1, "sh")
  "VB / VBScript" Call("Coder::Settings", 1, "vbs") Icon("%a\AkelFiles\Plugs\Toolbar\vbs.ico")
  "XBL" Call("Coder::Settings", 1, "xbl")
  "XML / DXL" Call("Coder::Settings", 1, "xml") Icon("%a\AkelFiles\Plugs\Toolbar\xml.ico")
  "XUL" Call("Coder::Settings", 1, "xul") Icon("%a\AkelFiles\Plugs\Toolbar\xul.ico")
  SEPARATOR
 "No filetype" Call("Coder::Settings", 1, "?")
}

and then in Edit Menu:

Code:
"Syntax theme" Menu("SYNTAXTHEME") Icon("%a\AkelFiles\Plugs\Coder.dll", 4)


I try to reproduce that, but I cannot identify where I have to put in that - can you please explain that a little more?

ContextMenu-Eng.txt explains very well how to config, but unfortunately it doesn't say where to config that.

The part of "Edit Menu" already written in Akelmenu (right click on toolbar), but I think the upper part "ContextMenu::Showmenu" is the important, so please explain me where I can find the position where I have to put that in.

Kind regards,
zeha


PS: I have found it... for all other who searching for that:

Options -> Plug-Ins... -> ContextMenu::Main -> Call


PPS: Is it possible, that you share your syntax icons from "%a\AkelFiles\Plugs\Toolbar\*.ico"? :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group