Path

ez projects / ezvim


eZVim

UNIX name Owner Status Version Compatible with
ezvim Damien Pobel beta 0.2 4.x
eZVim is a vim plugin released under the GNU GPL that adds some features to vim for eZ Publish CMS.

Features

  • Classes View : a sidebar displaying class groups, content classes and attributes.
  • Syntax highlighting for eZ Publish template syntax
  • Syntax highlighting for eZ Publish ini files and override (*.ini.append.php)
  • Some vim abbreviations for the eZ Publish template syntax.
  • Quick documentation search with ALT-d keybinding on any word in a template file

Requirements

  • vim and python scripting support. Under Debian or Ubuntu, just install the vim-python package.
  • eZ Publish with the ezdevtools extension to use the class view sidebar (not requirred otherwise)

Tested with vim 7.1 under Ubuntu. It should work under any Unix. Not tested with others.

Install and configure

  1. Download the archive.
  2. Unpack the archive in your ~/.vim/ or other directory where vim looks for plugin.
  3. Launch vim from your home directory and type :helptags .vim/doc in order to activate the helpfile.
  4. Download the eZDevtools extension. Unpack it in the extension directory of eZ Publish and activate it in the tab System > Extensions in the administration interface.

You can configure the width of the sidebar by setting the variable EzSideBarWidth in your .vimrc. The default is 42.

The Classes View sidebar lets you open the documentation with your web browser. The default browser is Firefox, it can be customized by setting the variable EzBrowser in your .vimrc.

For example, if you want to have a 30 characters width sidebar and you want to use Konqueror, put these 2 lines in your .vimrc :

let EzSideBarWidth=30
let EzBrowser=konqueror

Use

Classes View:

To load the classes view sidebar, just type

:cv ADDRESS

where ADDRESS is the adresse of your site. If you use siteaccess method, it looks like http://example.com/index.php/your_siteaccess. If you use hostname method, it looks like http://example.com

Note: cv is an abbreviation, vim automatically replace it by the real command (Ezcv).

In the sidebar :

  • + unfold a group or a class
  • - fold a group or a class
  • * unfold all
  • = fold all
  • d open the documentation for the class attribute on the current line
  • v view the class group or the class on the current line
  • e edit the class group or the class on the current line

Abbreviations for eZ Publish template:

Just type one of the abbreviation and a space, and vim will automagically :) replace it by many lines.

Control structures

  • ezfe : simple foreach loop
  • ezfes : foreach loop with sequence

Fetch

  • ezfcn : fetch content node
  • ezfcl : fetch content list
  • ezfcls : fetch content list with sort
  • ezfcla : fetch content list with attribute filter
  • ezfclas : fetch content list with attribute filter and sort
  • ezfclsa : fetch content list with attribute filter and sort
  • ezfclc : fetch content list_count
  • ezfclca : fetch cotnent list_count with attribute filter
  • ezfct : fetch content tree
  • ezfcts : fetch content tree with sort
  • ezfcta : fetch content tree with attribute filter
  • ezfctas : fetch content tree with attribute filter and sort
  • ezfctsa : fetch content tree with attribute filter and sort
  • ezfctc : fetch content tree_count
  • ezfctca : fetch content tree_count with attribute_filter

TODO

  • Template validation on save
  • Custom operators view sidebar

Screenshot

eZVim 0.1
eZVim 0.1

This project has no reviews yet. Be the first one to review it!