How to highlight tpl file?
Asked Answered
A

6

8

I'm using NOTPAD++ and I wonder how I can highlight codes in tpl files.

I googled online and there are answers but none of them works. For intance, http://sourceforge.net/p/notepad-plus/discussion/331753/thread/3067a53d/

Any ideas?

Or any other better programmes than NOTEPAD++ for highlighting codes in tpl files?

Ardys answered 12/8, 2013 at 10:31 Comment(0)
S
10

The following method is compatible with Sublime Text 2 and 3.

  1. Open your .tpl file in Sublime Text
  2. In the Sublime Text menu, navigate to PreferencesPackage Control
  3. From the drop-down list choose Package Control: Install Package
  4. Type "smarty" and Sublime Text Smarty should appear in the search results. Click it to install.
  5. In the menu you can now navigate to ViewSyntaxSmarty to enable Smarty syntax highlighting for your document.

More information about this package can be viewed here.

If you end up with the Command Palette (the drop-down part of the UI) still open after installing the package, you can press Ctrl Shift P, or on Mac Cmd Shift P, to toggle it closed again.

Sleep answered 9/11, 2019 at 4:44 Comment(0)
P
9

I found these instructions and worked for me.

http://was955.wordpress.com/2013/03/06/how-to-add-a-tpl-files-to-notepad-as-a-php-file/

  • Step 1) Run Notepad++ using from “Run as Administrator”.
  • Step 2) Go to “Settings”->”Style Configurator”.
  • Step 3) Add in the .tpl extension name into the “User ext” column by choosing PHP or html as a Language on from the options on left hand selection box.
  • Step 4) Click Save & Close on next.
Platinum answered 20/9, 2014 at 10:56 Comment(1)
selecting php would be more adequate, because includes html and php. Selecting html includes only html.Pegu
N
7

How about userDefineLang_smarty.xml:

http://notepad-plus.sourceforge.net/commun/userDefinedLang/userDefineLang_smarty.xml

Narra answered 12/8, 2013 at 10:54 Comment(1)
Please, refer here: #5678462 ;)Narra
C
2

My search for a good and free Smarty Editor, resulted in Netbeans with a Smarty Plugin (named PHP Smarty Framework). I am an eclipse user, whenever I need to work on views (templates) I switch to Netbeans. But, I accept this as a Temporary solution and looking for a working smarty plugin for Eclipse.

Chlamys answered 13/8, 2013 at 13:42 Comment(0)
G
1

SynWrite editor, also free, allows you to create TPL lexer of any kind. See lexer-related tutorials in Readme folder.

Gapin answered 19/8, 2013 at 14:42 Comment(0)
R
0

I've just tried, the highliting dont seems to work properly (text in white, bg in black).

is it working for you?

Rimrock answered 13/8, 2014 at 7:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.