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

ftplugin errors

Expand Messages
  • Aaron
    Hi all, I am working on a ftplugin and when I load a file to check the plugin I ... autoindent expandtab makeprg= --autoread filetype=lilypond number
    Message 1 of 10 , Aug 2, 2003
    • 0 Attachment
      Hi all,
      I am working on a ftplugin and when I load a file to check the plugin I
      get a screen which lists the following:
      --- Local optionvalues ---
      autoindent expandtab makeprg=
      --autoread filetype=lilypond number
      define= grepprg= path=
      errorformat= include= scroll=11
      fileencoding=utf-8
      formatoptions=tcql
      matchpairs=(:).{:},[:], <:>


      shiftwidth=2
      softtabstop=4
      syntax=lilypond
      tags=

      What does it mean?? where or how do I fix it or turn it off???
      Thanks
      Aaron
    • Srinath Avadhanula
      This looks like you have a line setlocal by itself somewhere in the script. ... for more information. Srinath
      Message 2 of 10 , Aug 2, 2003
      • 0 Attachment
        This looks like you have a line

        setlocal

        by itself somewhere in the script.
        :help :setlocal

        for more information.

        Srinath

        On Sat, 3 Aug 2003, Aaron wrote:

        > Hi all,
        > I am working on a ftplugin and when I load a file to check the plugin I
        > get a screen which lists the following:
        > --- Local optionvalues ---
        > autoindent expandtab makeprg=
        > --autoread filetype=lilypond number
        > define= grepprg= path=
        > errorformat= include= scroll=11
        > fileencoding=utf-8
        > formatoptions=tcql
        > matchpairs=(:).{:},[:], <:>
        >
        >
        > shiftwidth=2
        > softtabstop=4
        > syntax=lilypond
        > tags=
        >
        > What does it mean?? where or how do I fix it or turn it off???
        > Thanks
        > Aaron
        >
        >
        >
      • Aaron
        Thanks Aaron
        Message 3 of 10 , Aug 2, 2003
        • 0 Attachment
          Thanks
          Aaron
          On Sun, 2003-08-03 at 03:44, Srinath Avadhanula wrote:
          > This looks like you have a line
          >
          > setlocal
          >
          > by itself somewhere in the script.
          > :help :setlocal
          >
          > for more information.
          >
          > Srinath
          >
          > On Sat, 3 Aug 2003, Aaron wrote:
          >
          > > Hi all,
          > > I am working on a ftplugin and when I load a file to check the plugin I
          > > get a screen which lists the following:
          > > --- Local optionvalues ---
          > > autoindent expandtab makeprg=
          > > --autoread filetype=lilypond number
          > > define= grepprg= path=
          > > errorformat= include= scroll=11
          > > fileencoding=utf-8
          > > formatoptions=tcql
          > > matchpairs=(:).{:},[:], <:>
          > >
          > >
          > > shiftwidth=2
          > > softtabstop=4
          > > syntax=lilypond
          > > tags=
          > >
          > > What does it mean?? where or how do I fix it or turn it off???
          > > Thanks
          > > Aaron
          > >
          > >
          > >
        • Aaron
          Indeed I do and as the help file says setlocal by itself will list what I saw. Now the logical question in the plugin help it says I need to setlocal. Which I
          Message 4 of 10 , Aug 2, 2003
          • 0 Attachment
            Indeed I do and as the help file says setlocal by itself will list what
            I saw.
            Now the logical question in the plugin help it says I need to setlocal.
            Which I assume means that I must tell it what options are local to my
            script???
            Would that be the same list just with my local options??
            Thanks
            Aaron
            On Sun, 2003-08-03 at 03:44, Srinath Avadhanula wrote:
            > This looks like you have a line
            >
            > setlocal
            >
            > by itself somewhere in the script.
            > :help :setlocal
            >
            > for more information.
            >
            > Srinath
            >
            > On Sat, 3 Aug 2003, Aaron wrote:
            >
            > > Hi all,
            > > I am working on a ftplugin and when I load a file to check the plugin I
            > > get a screen which lists the following:
            > > --- Local optionvalues ---
            > > autoindent expandtab makeprg=
            > > --autoread filetype=lilypond number
            > > define= grepprg= path=
            > > errorformat= include= scroll=11
            > > fileencoding=utf-8
            > > formatoptions=tcql
            > > matchpairs=(:).{:},[:], <:>
            > >
            > >
            > > shiftwidth=2
            > > softtabstop=4
            > > syntax=lilypond
            > > tags=
            > >
            > > What does it mean?? where or how do I fix it or turn it off???
            > > Thanks
            > > Aaron
            > >
            > >
            > >
          • Luc Hermitte
            Hello, ... No. It means that the options you want to set for your filetype (lilypond?) must be local. For instance, if you want a tabstop to value 2 with
            Message 5 of 10 , Aug 2, 2003
            • 0 Attachment
              Hello,

              * On Sun, Aug 03, 2003 at 04:01:46AM +0300, Aaron <aamehl@...> wrote:
              > Now the logical question in the plugin help it says I need to
              > setlocal.
              > Which I assume means that I must tell it what options are local to my
              > script???
              > Would that be the same list just with my local options??

              No. It means that the options you want to set for your filetype
              (lilypond?) must be local.

              For instance, if you want a tabstop to value 2 with lilypond files, then
              add in your ftplugin:
              :setlocal tabstop 2

              Almost every option can be local to a buffer. Check the associated help.

              BTW, it is same thing with mappings and commands : prefer them to be local.
              -> ":inoremap <buffer> ... ...", ":command -buffer ... ...", etc.

              --
              Luc Hermitte
              http://hermitte.free.fr/vim/
            • Aaron
              ... Does that mean for every key mapping I must :setlocal??? Thanks Aaron
              Message 6 of 10 , Aug 2, 2003
              • 0 Attachment
                > Almost every option can be local to a buffer. Check the associated help.
                >
                > BTW, it is same thing with mappings and commands : prefer them to be local.
                > -> ":inoremap <buffer> ... ...", ":command -buffer ... ...",
                Does that mean for every key mapping I must :setlocal???


                Thanks
                Aaron
              • Mikolaj Machowski
                ... Yes. It is good idea to keep your settings (options, mappings, commands) local to the buffer. m. -- LaTeX + Vim = http://vim-latex.sourceforge.net/
                Message 7 of 10 , Aug 3, 2003
                • 0 Attachment
                  On Sun, Aug 03, 2003 at 05:01:55AM +0300, Aaron wrote:
                  > > Almost every option can be local to a buffer. Check the associated help.
                  > >
                  > > BTW, it is same thing with mappings and commands : prefer them to be local.
                  > > -> ":inoremap <buffer> ... ...", ":command -buffer ... ...",
                  > Does that mean for every key mapping I must :setlocal???

                  Yes. It is good idea to keep your settings (options, mappings, commands)
                  local to the buffer.

                  m.
                  --
                  LaTeX + Vim = http://vim-latex.sourceforge.net/
                  Vim-list(s) Users Map: (last change 27 May)
                  http://skawina.eu.org/mikolaj/vimlist
                  Are You There?
                • uws
                  ... I don t think this is necessary. AFAIK filetype plugins always operate on the current buffer. mvrgr, Wouter -- ... i know :: the past will catch you up as
                  Message 8 of 10 , Aug 3, 2003
                  • 0 Attachment
                    På Sun, Aug 03, 2003 at 03:20:22AM +0200, Luc Hermitte skrev:
                    > For instance, if you want a tabstop to value 2 with lilypond files, then
                    > add in your ftplugin:
                    > :setlocal tabstop 2

                    I don't think this is necessary. AFAIK filetype plugins always operate on
                    the current buffer.

                    mvrgr, Wouter

                    --
                    :wq mail uws@...

                    i know :: the past will catch you up as you run faster -- placebo
                  • Antoine J. Mechelynck
                    ... The standard ones only affect the current buffer _because_ they use setlocal rather than set and map rather than plain map. Under :help
                    Message 9 of 10 , Aug 3, 2003
                    • 0 Attachment
                      uws <uws@...> wrote:
                      > På Sun, Aug 03, 2003 at 03:20:22AM +0200, Luc Hermitte skrev:
                      > > For instance, if you want a tabstop to value 2 with lilypond files,
                      > > then add in your ftplugin:
                      > > :setlocal tabstop 2
                      >
                      > I don't think this is necessary. AFAIK filetype plugins always
                      > operate on the current buffer.
                      >
                      > mvrgr, Wouter
                      >
                      > --
                      > > wq mail
                      > > uws@...
                      >
                      > i know :: the past will catch you up as you run faster --
                      > placebo

                      The standard ones only affect the current buffer _because_ they use setlocal
                      rather than set and map <buffer> rather than plain map.

                      Under :help write-filetype-plugin

                      OPTIONS

                      To make sure the filetype plugin only affects the current buffer use the

                      :setlocal

                      command to set options. Use only options which are local to a buffer [...]

                      MAPPINGS

                      To make sure mappings only work in the current buffer use the

                      :map <buffer>

                      command. [...]

                      Regards,
                      Tony.
                    • Luc Hermitte
                      Hello, ... No, they should be local (this is more logical). A mapping is defined as local with , a command with -buffer , ... ... [Note: there is no
                      Message 10 of 10 , Aug 3, 2003
                      • 0 Attachment
                        Hello,


                        * On Sun, Aug 03, 2003 at 05:01:55AM +0300, Aaron <aamehl@...> wrote:
                        > > Almost every option can be local to a buffer. Check the associated help.
                        > >
                        > > BTW, it is same thing with mappings and commands : prefer them to be
                        > > local. -> ":inoremap <buffer> ... ...", ":command -buffer ...
                        > > ...",
                        > Does that mean for every key mapping I must :setlocal???

                        No, they should be local (this is more logical). A mapping is defined as
                        local with '<buffer>', a command with '-buffer', ...
                        Check:
                        :h :map-<buffer>
                        :h :command

                        [Note: there is no direct help to ":command -buffer " ...]


                        You can found examples of typical (but yet complex) ftplugin on my web
                        site at this address:
                        http://hermitte.free.fr/vim/ressources/vimfiles/ftplugin/


                        --
                        Luc Hermitte
                        http://hermitte.free.fr/vim/
                      Your message has been successfully submitted and would be delivered to recipients shortly.