sponsor Vim development Vim logo Vim Book Ad

vim-freemarker : Freemarker syntax and functions

 script karma  Rating 23/11, Downloaded by 1079  Comments, bugs, improvements  Vim wiki

created by
Andres Hazard
 
script type
ftplugin
 
description
When opening a .ftl file the filetype will be set to "freemarker" this will activate the syntax highlighting.

The plugin also has some functions for quick editing.

Functions and Mapping

The plugin has the follwing functions that will only be load when opening a .ftl file, you can map them in your vimrc :

:call FTLIf()

It will insert the basic if tags (#if-#else) and leave the cursor after the if tag in insert mode You can use this map in your vimrc

                nnoremap <leader>fi :call FTLIf()<CR>
:call FTLList()

It will insert the basic list tags(#list-#else-/#list). Cursor after the list tag in insert mode You can use this map in your vimrc

                nnoremap <leader>fl :call FTLList()<CR>
:call FTLBigList()

It will insert the new (since FreeMarker 2.3.23) list tags(#list-#items-/#items-#else-/#list). Cursor after the list tag in insert mode You can use this map in your vimrc

                nnoremap <leader>fb :call FTLBigList()<CR>
:call FTLSwitch()

It will insert the switch tags(#switch, 3 #case and #break, #default, /#switch). Cursor after the switch tag in insert mode You can use this map in your vimrc

                nnoremap <leader>fs :call FTLSwitch()<CR>
:call FTLAssign()

It will insert the assign tag and leave the cursor on insert mode

                nnoremap <leader>fa :call FTLAssign()<CR>
 
install details
Installation

You can use Pathogen

git clone https://github.com/andreshazard/vim-freemarker.git
~/.vim/bundle/vim-freemarker.vim
For Vundle add to your vimrc

Plugin 'andreshazard/vim-freemarker'
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-freemarker.tar 1.0 2016-05-08 7.0 Andres Hazard Initial upload
ip used for rating: 18.97.14.85

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github