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

Tabstop for python on mac for vim 7.4 messed up

Expand Messages
  • Sid
    Hi, I m using vim 7.4 on the Mac. In my .vimrc, I set the tabstop to 4. However if I have the line filetype plugin on (which I really need), then the tabstop
    Message 1 of 6 , Jun 30, 2014
    • 0 Attachment
      Hi,

      I'm using vim 7.4 on the Mac. In my .vimrc, I set the tabstop to 4. However if I have the line "filetype plugin on" (which I really need), then the tabstop for python (but not for c++, java, c, julia) is being set to 8. This is happening both with MacVim as well as the brew install version.

      This does not happen with Vim 7.3, neither for the OSX default nor for MacVim.

      Help would be greatly appreciated!
      Thanks!

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • Gary Johnson
      ... I think the behavior you re seeing is correct. I don t have the reference at the moment, but at least at one time Python specified that tab stops were to
      Message 2 of 6 , Jun 30, 2014
      • 0 Attachment
        On 2014-06-30, Sid wrote:
        > Hi,
        >
        > I'm using vim 7.4 on the Mac. In my .vimrc, I set the tabstop to
        > 4. However if I have the line "filetype plugin on" (which I really
        > need), then the tabstop for python (but not for c++, java, c,
        > julia) is being set to 8. This is happening both with MacVim as
        > well as the brew install version.
        >
        > This does not happen with Vim 7.3, neither for the OSX default nor
        > for MacVim.

        I think the behavior you're seeing is correct. I don't have the
        reference at the moment, but at least at one time Python specified
        that tab stops were to be 8. Indentation, though, can be anything
        you want.

        Regards,
        Gary

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      • Ben Fritz
        ... Probably the python filetype plugin is setting a tabstop for you, which as Gary says I think is intentional. The filetype plugin says: As suggested by
        Message 3 of 6 , Jun 30, 2014
        • 0 Attachment
          On Monday, June 30, 2014 4:18:09 PM UTC-5, Sid wrote:
          > Hi,
          >
          > I'm using vim 7.4 on the Mac. In my .vimrc, I set the tabstop to 4. However if I have the line "filetype plugin on" (which I really need), then the tabstop for python (but not for c++, java, c, julia) is being set to 8. This is happening both with MacVim as well as the brew install version.
          >
          > This does not happen with Vim 7.3, neither for the OSX default nor for MacVim.
          >
          > Help would be greatly appreciated!
          > Thanks!

          Probably the python filetype plugin is setting a tabstop for you, which as Gary says I think is intentional. The filetype plugin says:

          " As suggested by PEP8.
          setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8

          If you don't like that, then set up a FileType autocmd to fix it:

          autocmd FileType python setlocal tabstop=8

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/d/optout.
        • Sid
          ... I tried that, both in .vimrc and in ftplugin/python.vim but it didn t work. Any ideas on why? Also how come this is happening in vim 7.4 but not 7.3? -- --
          Message 4 of 6 , Jun 30, 2014
          • 0 Attachment
            On Monday, June 30, 2014 7:40:52 PM UTC-4, Ben Fritz wrote:
            > On Monday, June 30, 2014 4:18:09 PM UTC-5, Sid wrote:
            > > Hi,
            > >
            > > I'm using vim 7.4 on the Mac. In my .vimrc, I set the tabstop to 4. However if I have the line "filetype plugin on" (which I really need), then the tabstop for python (but not for c++, java, c, julia) is being set to 8. This is happening both with MacVim as well as the brew install version.
            > >
            > > This does not happen with Vim 7.3, neither for the OSX default nor for MacVim.
            > >
            > > Help would be greatly appreciated!
            > > Thanks!
            >
            > Probably the python filetype plugin is setting a tabstop for you, which as Gary says I think is intentional. The filetype plugin says:
            >
            > " As suggested by PEP8.
            > setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
            >
            > If you don't like that, then set up a FileType autocmd to fix it:
            >
            > autocmd FileType python setlocal tabstop=8

            I tried that, both in .vimrc and in ftplugin/python.vim but it didn't work. Any ideas on why? Also how come this is happening in vim 7.4 but not 7.3?

            --
            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/d/optout.
          • Sid
            ... That worked, thanks! Incidentally, do you know why this was not happening in vim 7.3? --Sid -- -- You received this message from the vim_use maillist. Do
            Message 5 of 6 , Jun 30, 2014
            • 0 Attachment
              On Monday, June 30, 2014 7:40:52 PM UTC-4, Ben Fritz wrote:
              > On Monday, June 30, 2014 4:18:09 PM UTC-5, Sid wrote:
              > > Hi,
              > >
              > > I'm using vim 7.4 on the Mac. In my .vimrc, I set the tabstop to 4. However if I have the line "filetype plugin on" (which I really need), then the tabstop for python (but not for c++, java, c, julia) is being set to 8. This is happening both with MacVim as well as the brew install version.
              > >
              > > This does not happen with Vim 7.3, neither for the OSX default nor for MacVim.
              > >
              > > Help would be greatly appreciated!
              > > Thanks!
              >
              > Probably the python filetype plugin is setting a tabstop for you, which as Gary says I think is intentional. The filetype plugin says:
              >
              > " As suggested by PEP8.
              > setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
              >
              > If you don't like that, then set up a FileType autocmd to fix it:
              >
              > autocmd FileType python setlocal tabstop=8

              That worked, thanks! Incidentally, do you know why this was not happening in vim 7.3?

              --Sid

              --
              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/d/optout.
            • Sid
              ... That worked, thanks! -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For
              Message 6 of 6 , Jun 30, 2014
              • 0 Attachment
                On Monday, June 30, 2014 7:40:52 PM UTC-4, Ben Fritz wrote:
                > On Monday, June 30, 2014 4:18:09 PM UTC-5, Sid wrote:
                > > Hi,
                > >
                > > I'm using vim 7.4 on the Mac. In my .vimrc, I set the tabstop to 4. However if I have the line "filetype plugin on" (which I really need), then the tabstop for python (but not for c++, java, c, julia) is being set to 8. This is happening both with MacVim as well as the brew install version.
                > >
                > > This does not happen with Vim 7.3, neither for the OSX default nor for MacVim.
                > >
                > > Help would be greatly appreciated!
                > > Thanks!
                >
                > Probably the python filetype plugin is setting a tabstop for you, which as Gary says I think is intentional. The filetype plugin says:
                >
                > " As suggested by PEP8.
                > setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
                >
                > If you don't like that, then set up a FileType autocmd to fix it:
                >
                > autocmd FileType python setlocal tabstop=8

                That worked, thanks!

                --
                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_use" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                For more options, visit https://groups.google.com/d/optout.
              Your message has been successfully submitted and would be delivered to recipients shortly.