iwata
6/26/2011 - 12:26 AM

template.vim

" textobj-template - Text objects for WAF template engine.
" Version: 0.0.1
" Author: Kazuhito Hokamura
" License: MIT license (see <http://www.opensource.org/licenses/mit-license>)

if exists('g:loaded_textobj_template')
  finish
endif

call textobj#user#plugin('template', {
\      'tt': {
\           'select-a': 'aTT',
\           'select-i': 'iTT',
\           '*pattern*': ['\[%-\? ', ' -\?%\]'],
\      },
\      'tt2': {
\           'select-a': 'aTT',
\           'select-i': 'iTT',
\           '*pattern*': ['\[%-\? ', ' -\?%\]'],
\      },
\      'tt2html': {
\           'select-a': 'aTT',
\           'select-i': 'iTT',
\           '*pattern*': ['\[%-\? ', ' -\?%\]'],
\      },
\      'mt': {
\           'select-a': 'aTm',
\           'select-i': 'iTm',
\           '*pattern*': ['<?= ', ' ?>'],
\      },
\      'rhtml': {
\           'select-a': 'aTr',
\           'select-i': 'iTr',
\           '*pattern*': ['<%= ', ' %>'],
\      },
\      'django': {
\           'select-a': 'aTd',
\           'select-i': 'iTd',
\           '*pattern*': ['{\(%\|{\) ', ' \(%\|}\)}'],
\      },
\   })

let loaded_textobj_template= 1