From 45273d44d4b1bd9a1be431c1a98f9046ed3a5c79 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sun, 8 Jun 2014 13:18:33 +0200 Subject: Major update --- ftplugin/mustache.vim | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'ftplugin/mustache.vim') diff --git a/ftplugin/mustache.vim b/ftplugin/mustache.vim index 38901654..592ed09d 100644 --- a/ftplugin/mustache.vim +++ b/ftplugin/mustache.vim @@ -59,10 +59,18 @@ xnoremap ]] :call sectionmovement('{{','' ,'v',v:cou " Operator pending mappings -onoremap ie :call wrap_inside() -onoremap ae :call wrap_around() -xnoremap ie :call wrap_inside() -xnoremap ae :call wrap_around() +" Operators are available by default. Set `let g:mustache_operators = 0` in +" your .vimrc to disable them. +if ! exists("g:mustache_operators") + let g:mustache_operators = 1 +endif + +if exists("g:mustache_operators") && g:mustache_operators + onoremap ie :call wrap_inside() + onoremap ae :call wrap_around() + xnoremap ie :call wrap_inside() + xnoremap ae :call wrap_around() +endif function! s:wrap_around() " If the cursor is at the end of the tag element, move back -- cgit v1.2.3