Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Syntax Highlighting web page broken
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Smarty Forum Index -> Documentation
View previous topic :: View next topic  
Author Message
hellotheworld
Smarty n00b


Joined: 05 Aug 2011
Posts: 1

PostPosted: Fri Aug 05, 2011 8:49 pm    Post subject: Notepad++ user defined lang for SMARTY Reply with quote

hi all,

in order to highlight SMARTY code in Notepad++, you have to use a xml dedicated file, called 'userDefineLang.xml'.
- If it exist, it is in the Notepad++ folder. (you will have to append the xml for smarty to the file)
- If it doesn't exist, just rename the xml smarty file from userDefineLang_smarty.xml to userDefineLang.xml

Shocked NOTE : by default (installation from scratch), the 'userDefineLang.xml' file does NOT exist. Just copy the userDefineLang_smarty.xml in the Notepadfolder and rename it to userDefineLang.xml ! easy !!

Arrow NOTEPAD++ (new) home site :
http://notepad-plus-plus.org/

Arrow the USER LANG WIKI home page :
http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=User_Defined_Language_Files

Arrow Arrow The userDefineLang.xml source's for smarty, called userDefineLang_smarty.xml :
http://notepad-plus.sourceforge.net/commun/userDefinedLang/userDefineLang_smarty.xml (just download it !! Wink )


Enjoy !

HelloTheWorld, proud french webmaster of
http://www.gastronomieartisanale.com/
Back to top
View user's profile Send private message
MrVon
Smarty Rookie


Joined: 08 Jul 2011
Posts: 15

PostPosted: Fri Jan 06, 2012 12:14 am    Post subject: Reply with quote

alv_in wrote:
Excuse me for digging up old thread.

Could someone publish bluelueboy userDefineLang.xml file?
I used to use it, but forgot to backup, and the link http://barrhauss.com/storage/smarty/userDefineLang.xml is now
dead.

thanks in advance


Dont forget about archive dot org
copy full line in browser: http://wayback.archive.org/web/*/http://www.barrhauss.com/storage/smarty/userDefineLang.xml

But dont try if you have v5.9 it does not work and make program crash.
Back to top
View user's profile Send private message
bluelueboy
Smarty Rookie


Joined: 21 Jan 2009
Posts: 5

PostPosted: Thu Feb 09, 2012 10:54 am    Post subject: Reply with quote

Yep, sorry for that, new Ezpublish install, had to move things arround a little.

The links have now changed and are

http://storage.barrhauss.com/smarty/userDefineLang.xml
http://storage.barrhauss.com/smartysimple/userDefineLang.xml


alv_in wrote:
Excuse me for digging up old thread.

Could someone publish bluelueboy userDefineLang.xml file?
I used to use it, but forgot to backup, and the link http://barrhauss.com/storage/smarty/userDefineLang.xml is now
dead.

thanks in advance
Back to top
View user's profile Send private message
acantonyclark1
Smarty n00b


Joined: 16 Mar 2012
Posts: 1

PostPosted: Fri Mar 16, 2012 7:04 am    Post subject: Reply with quote

thanks for the smarty suggestion. I used userDefineLang.xml file in notepad plus plus. It worked.
Back to top
View user's profile Send private message
theillo
Smarty n00b


Joined: 11 Jan 2015
Posts: 1

PostPosted: Sun Jan 11, 2015 3:23 am    Post subject: Reply with quote

Hey hey! I know this is old, but...

I downloaded the xml, replaced it with admin rights in both the notpad dir under programs, as well as under app data.

I use the Hot Fudge Sunday theme, but when I switch to "user defined" language, it all turns black (black font on black background). When I switch to the default theme I have black on white. Not very helpful.

Using Windows 7 and Notepad++ V6.6.9

Any ideas why it's not properly highlighting anything?

Thanks for any help!
Back to top
View user's profile Send private message
Aristophan
Smarty Regular


Joined: 10 Jan 2011
Posts: 86

PostPosted: Sun Jan 18, 2015 12:34 pm    Post subject: Reply with quote

The Smarty comment rule is
Code:
<Keywords name="Comment">1 1* 2*&#x0D;&#x0A; 0</Keywords>

which works fine all over - but if you have to use multiplication, eg
Code:
{$a * $b}
it highlights the following as a comment. To avoid this you can use
Code:
{***}
just after, but this is not nice too.

So, does anyone have a brilliant idea on how to change the upper comment syntax rule to respect or not work on math multiplications?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Documentation All times are GMT
Goto page Previous  1, 2
Page 2 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


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP