Thank you Mike Richman (I don't understand why I cannot reply to your
post on the list)
%%%%%%%%
The error seems to be saying the function is already defined. You can
redefine the function by placing a ! after 'function'. I think you also
need one after 'command' to redefine the corresponding command.
On 24/04/2016 17:34, pierrO wrote:
> Hi, someone helped me with a script to deal with indenting in templates
> when :TTemplate is called.
>
> 1 """ set paste for TTemplate
> 2 function TexTemplateWithPasteSet()
> 3 set paste
> 4 TTemplate
> 5 set nopaste
> 6 endfunction
> 7 command Template call TexTemplateWithPasteSet()
> 8 """use command :Template rather than :TTemplate
>
>
> But when I switch between files open in vim, I receive this message, and
> I don't understand where I must put the !
>
> Erreur détectée en traitant /home/pierre/.vim/after/ftplugin/tex.vim :
> ligne 6 :
> E122: La fonction TexTemplateWithPasteSet existe déjà (ajoutez ! pour la
> remplacer)
> ligne 7 :
> E174: La commande existe déjà : ajoutez ! pour la redéfinir
>
> Thank you for your help and explanations.
>
--
Tu veux dîner mais tu n'as pas de sous Pierre.
|