Loading ...
Sorry, an error occurred while loading the content.

Re: latex ftplugin for unicode

Expand Messages
  • Benji Fisher
    ... It is all right. Script variables are stored with the script, and new copies are NOT created each time the script is run. Just to make sure, I added the
    Message 1 of 5 , Apr 29, 2002
    • 0 Attachment
      On Sunday, April 28, 2002, at 07:30 PM, Antoine J. Mechelynck wrote:

      > In order to serve its purpose, shouldn't that "loaded_tex_unicode"
      > variable
      > be global? I'm new to that sort of things, but wouldn't it otherwise be
      > re-created, with a different "script context", whenever the script was
      > invoked? Or does making it a plugin take care of that?
      >
      > Tony.
      >
      > ----- Original Message -----
      > From: "Benji Fisher" <benji@...>
      > To: <vim@...>
      > Sent: Sunday, April 28, 2002 9:44 PM
      > Subject: Re: latex ftplugin for unicode
      >
      >
      >> Benji Fisher wrote:
      >>>
      >> [snip]
      >>> if exists("s:loaded_tex_unicode")
      >>> finish
      >>> endif
      >>> let s:loaded_tex_unicode = 1
      >>> [snip]

      It is all right. Script variables are stored with the script, and
      new copies are NOT created each time the script is run. Just to make
      sure, I added the lines

      if exists("s:tex_count")
      let s:tex_count = s:tex_count + 1
      else
      let s:tex_count = 1
      endif
      call input("Number of tex buffers opened: " . s:tex_count)

      to my ftplugin/tex.vim file, and it worked as I had hoped. One thing
      that you cannot do if s:loaded_tex_unicode is a script variable is set
      it from your vimrc file in order to disable the plugin. As I said in a
      previous note, I do not think this is a problem for a non-default
      plugin. (Why would anyone install it and then want to disable it?)

      --Benji Fisher
    Your message has been successfully submitted and would be delivered to recipients shortly.