Vim plugin for the Fluid Template Engine, indenting, and syntax plugin. Integrated HTML, JavaScript and CSS indention and highlighting.
  • Vim Script 100%
Find a file
2016-06-22 14:04:03 +02:00
ftdetect initual import 2016-06-15 22:54:40 +02:00
ftplugin add usage 2016-06-15 23:57:07 +02:00
indent add f:cObject, f:format to notags 2016-06-22 14:04:03 +02:00
syntax add usage 2016-06-15 23:57:07 +02:00
README.md add usage 2016-06-15 23:57:07 +02:00

vim-fluid

Vim plugin for the Fluid Template Engine offering indention and syntax highlighting for fluid code together with plain HTML and JavaScript and CSS code.

Fluid is the core template engine of TYPO3.

Usage

vim-fluid autodetects .fluid files but in most cases your files will end with .html, so you should set a modeline on top of your file. E.g.:

<!-- vim: set ft=fluid :-->

Example

:ggVG produces this indenting

<!-- fluid indenting test file -->
 <html>
   <script>
     if (x=1){
       var x=e;
     }
   </script>

   <style>
      .class-x {
        color:white;
      }
   </style>

   <div>
     <f:for each="{filters}" as="filter">
       <f:if condition="{filter.type} == 'checkbox'">
         <f:then>
           <f:render partial="checkbox" arguments="{filter : filter}" />
         </f:then>
         <f:else>
           <f:render partial="selectbox" arguments="{filter : filter}" />
         </f:else>
       </f:if>
     </f:for>
   </div>
</html>

Contributing

  1. Fork it ( https://github.com/mipmip/vim-fluid/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Credits

image