Coder Social home page Coder Social logo

smarty.vim's Introduction

Smarty plugin for Vim

This plugin provides syntax highlighting, indenting and general filetype settings for the Smarty templating language.

This is a fork of Vim Script #1798 (see the original README below).

Enhancements

The following (probably incomplete) list of enhancements are provided:

  • Various improvements throughout the syntax handling.
  • {php}โ€ฆ{/php} blocks are delegated to PHP syntax.
  • filetype is set to "smarty" for *.tpl files.
  • syntax is based on HTML filetype.
  • matchit (jumping between tags via %) is configured for Smarty tags ({foo} .. {/foo}), and based on the html setup.
  • line endings have been converted to unix fileformat (to prevent parse errors on Linux/Mac).
  • Smarter indenting, handling PHP blocks and delegating to HTML (includes JavaScript).

About Smarty

Smarty is a PHP template language.

About this fork

I am not using Smarty that much (anymore), but wanted to get these enhancements published, for others to pick them up.

Pull requests are welcome, of course.

Original README

This is a mirror of http://www.vim.org/scripts/script.php?script_id=1798

A friend and I found that there were no acceptable vim syntax files for smarty, so we took the only one we could find and added everything from the smarty documentation (http://smarty.php.net/manual/en) to it. If nothing else, this is a very good start on a complete smarty syntax file. We have even used vimtip #498 to use autocomplete with this syntax and so far it seems to work well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.