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

Vim spontaneously switch to tabs from spaces for indents

Expand Messages
  • Denis Redozubov
    Hey guys! Sometimes, when i edit ruby code(i haven t noticed this problem with another file types), vim gets confused and start using tabs instead of spaces
    Message 1 of 10 , Jul 4, 2014
    • 0 Attachment
      Hey guys!

      Sometimes, when i edit ruby code(i haven't noticed this problem with another file types), vim gets confused and start using tabs instead of spaces for indents. It can happen multiple times per hour and although it can be fixed with :set expandtab, it's extremely annoying.

      I have no idea how to debug this. Can anyone point me in a right direction?

      configuration i'm using: https://github.com/dredozubov/dotvim

      Denis Redozubov

      --
      --
      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.
    • Tim Chase
      ... When it breaks (and before you fix it with :set expandtab ), what does ... report? -tim -- -- You received this message from the vim_use maillist. Do
      Message 2 of 10 , Jul 4, 2014
      • 0 Attachment
        On 2014-07-04 09:11, Denis Redozubov wrote:
        > Sometimes, when i edit ruby code(i haven't noticed this problem
        > with another file types), vim gets confused and start using tabs
        > instead of spaces for indents. It can happen multiple times per
        > hour and although it can be fixed with :set expandtab, it's
        > extremely annoying.
        >
        > I have no idea how to debug this. Can anyone point me in a right
        > direction?

        When it breaks (and before you fix it with ":set expandtab"), what
        does

        :verbose set expandtab?

        report?

        -tim


        --
        --
        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.
      • Denis Redozubov
        Just tried it, Tim. No output whatsoever. Denis. ... -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the
        Message 3 of 10 , Jul 14, 2014
        • 0 Attachment
          Just tried it, Tim. No output whatsoever.

          Denis.

          On Saturday, July 5, 2014 1:43:06 AM UTC+4, Tim Chase wrote:
          > On 2014-07-04 09:11, Denis Redozubov wrote:
          >
          > > Sometimes, when i edit ruby code(i haven't noticed this problem
          >
          > > with another file types), vim gets confused and start using tabs
          >
          > > instead of spaces for indents. It can happen multiple times per
          >
          > > hour and although it can be fixed with :set expandtab, it's
          >
          > > extremely annoying.
          >
          > >
          >
          > > I have no idea how to debug this. Can anyone point me in a right
          >
          > > direction?
          >
          >
          >
          > When it breaks (and before you fix it with ":set expandtab"), what
          >
          > does
          >
          >
          >
          > :verbose set expandtab?
          >
          >
          >
          > report?
          >
          >
          >
          > -tim

          --
          --
          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.
        • Tim Chase
          [when replying via Google Groups, could you trim the extra spaces that Google inserts between each line, refrain from top-posting and trim to just the germane
          Message 4 of 10 , Jul 14, 2014
          • 0 Attachment
            [when replying via Google Groups, could you trim the extra spaces
            that Google inserts between each line, refrain from top-posting and
            trim to just the germane content? Thanks!]

            On 2014-07-14 09:15, Denis Redozubov wrote:
            >> When it breaks (and before you fix it with ":set expandtab"), what
            >> does
            >>
            >> :verbose set expandtab?
            >> report?
            >
            > Just tried it, Tim. No output whatsoever.

            AFAIK, vim should *always* report something back here, even in the
            "tiny" build of vim. In my local "vim.tiny", it at least reports
            back "expandtab" or "noexpandtab". In larger builds, it reports

            expandtab
            Last set from ~/tmp/test.vimrc

            If you don't get *anything*, are you certain that you're running Vim
            rather than some other vi clone such as nvi? Could you include the
            output of "vim --version" or ":version" to see if there's anything
            suspect in it?

            Thanks,

            -tim


            --
            --
            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.
          • Denis Redozubov
            ... Yep, i m positive this is standard vim. % vim --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 15 2013 23:08:10) Full version output here:
            Message 5 of 10 , Jul 14, 2014
            • 0 Attachment
              On Monday, July 14, 2014 8:25:54 PM UTC+4, Tim Chase wrote:
              > [when replying via Google Groups, could you trim the extra spaces
              >
              > that Google inserts between each line, refrain from top-posting and
              >
              > trim to just the germane content? Thanks!]
              >
              >
              >
              > On 2014-07-14 09:15, Denis Redozubov wrote:
              >
              > >> When it breaks (and before you fix it with ":set expandtab"), what
              >
              > >> does
              >
              > >>
              >
              > >> :verbose set expandtab?
              >
              > >> report?
              >
              > >
              >
              > > Just tried it, Tim. No output whatsoever.
              >
              >
              >
              > AFAIK, vim should *always* report something back here, even in the
              >
              > "tiny" build of vim. In my local "vim.tiny", it at least reports
              >
              > back "expandtab" or "noexpandtab". In larger builds, it reports
              >
              >
              >
              > expandtab
              >
              > Last set from ~/tmp/test.vimrc
              >
              >
              >
              > If you don't get *anything*, are you certain that you're running Vim
              >
              > rather than some other vi clone such as nvi? Could you include the
              >
              > output of "vim --version" or ":version" to see if there's anything
              >
              > suspect in it?
              >
              >
              >
              > Thanks,
              >
              >
              >
              > -tim

              Yep, i'm positive this is standard vim.
              % vim --version
              VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 15 2013 23:08:10)
              Full version output here: https://gist.github.com/dredozubov/d1603a974d142a6f4ef9

              I set verbosefile to ~/verbosefile and it's still empty(it was created by vim though) after some usage. I'm at a loss here.

              Denis.

              --
              --
              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.
            • Tim Chase
              ... I m still getting blank lines inserted in your post. The Python mailing list maintains a good page on how to remedy that:
              Message 6 of 10 , Jul 14, 2014
              • 0 Attachment
                On 2014-07-14 09:38, Denis Redozubov wrote:
                > On Monday, July 14, 2014 8:25:54 PM UTC+4, Tim Chase wrote:
                > > [when replying via Google Groups, could you trim the extra spaces
                > >
                > > that Google inserts between each line, refrain from top-posting
                > > and
                > >
                > > trim to just the germane content? Thanks!]

                I'm still getting blank lines inserted in your post. The Python
                mailing list maintains a good page on how to remedy that:

                https://wiki.python.org/moin/GoogleGroupsPython

                > Yep, i'm positive this is standard vim.
                > % vim --version
                > VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 15 2013 23:08:10)

                Okay, that all looks kosher, I just wanted to eliminate the obvious
                there.

                > I set verbosefile to ~/verbosefile and it's still empty(it was
                > created by vim though) after some usage. I'm at a loss here.

                When I have 'verbosefile' set, issuing ":verbose set et?" just
                reports the current setting value. But when I have 'verbosefile'
                unset, it actually prints the helpful information I was hoping to
                get. Does unsetting 'verbosefile' tell you anything more?

                -tim

                --
                --
                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.
              • Denis Redozubov
                ... Sorry for the style issues, i m generally not a maillist guy and it s my first posting. Thanks for suggestions! I totally overlooked it first time. ... I
                Message 7 of 10 , Jul 14, 2014
                • 0 Attachment
                  On Monday, July 14, 2014 8:54:13 PM UTC+4, Tim Chase wrote:
                  > I'm still getting blank lines inserted in your post. The Python
                  > mailing list maintains a good page on how to remedy that:

                  Sorry for the style issues, i'm generally not a maillist guy and
                  it's my first posting. Thanks for suggestions!
                  I totally overlooked it first time.

                  > When I have 'verbosefile' set, issuing ":verbose set et?" just
                  > reports the current setting value. But when I have 'verbosefile'
                  > unset, it actually prints the helpful information I was hoping to
                  > get. Does unsetting 'verbosefile' tell you anything more?

                  I get nothing when i attempt to ':verbose se et' even with the 'verbosefile' unset.
                  I see other stuff, such as ':Ggrep' output or ':lcd'.

                  Denis

                  --
                  --
                  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.
                • Denis Redozubov
                  ... Oh, i m feeling pretty silly now. I was trying it without question mark at the end. I m getting noexpandtab message as expected. Denis. -- -- You
                  Message 8 of 10 , Jul 14, 2014
                  • 0 Attachment
                    On Monday, July 14, 2014 9:10:16 PM UTC+4, Denis Redozubov wrote:
                    > I get nothing when i attempt to ':verbose se et' even with the 'verbosefile' unset.
                    > I see other stuff, such as ':Ggrep' output or ':lcd'.

                    Oh, i'm feeling pretty silly now. I was trying it without question mark at the end.
                    I'm getting 'noexpandtab' message as expected.

                    Denis.

                    --
                    --
                    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.
                  • Tim Chase
                    ... Phew...I was running out of ideas there. :-) So according to what I remember of this thread, it only happened sometimes. So the aim would be to reproduce
                    Message 9 of 10 , Jul 14, 2014
                    • 0 Attachment
                      On 2014-07-14 10:27, Denis Redozubov wrote:
                      > > I get nothing when i attempt to ':verbose se et' even with the
                      > > 'verbosefile' unset. I see other stuff, such as ':Ggrep' output
                      > > or ':lcd'.
                      >
                      > Oh, i'm feeling pretty silly now. I was trying it without question
                      > mark at the end. I'm getting 'noexpandtab' message as expected.

                      Phew...I was running out of ideas there. :-)

                      So according to what I remember of this thread, it only happened
                      sometimes. So the aim would be to reproduce the situation, then issue

                      :verbose set et?

                      which should report back something like

                      noexpandtab
                      Last set from /path/to/guilty/plugin.vim

                      -tim

                      (and thanks for fixing the Google Groups annoyances, it's a lot
                      easier to read your replies now)





                      --
                      --
                      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.
                    • Denis Redozubov
                      ... Just tried it and got just noexpandtab without Last set from part. Denis -- -- You received this message from the vim_use maillist. Do not top-post!
                      Message 10 of 10 , Jul 14, 2014
                      • 0 Attachment
                        On Monday, July 14, 2014 9:36:21 PM UTC+4, Tim Chase wrote:
                        > So according to what I remember of this thread, it only happened
                        > sometimes. So the aim would be to reproduce the situation, then issue
                        >
                        > :verbose set et?
                        >
                        > which should report back something like
                        >
                        > noexpandtab
                        > Last set from /path/to/guilty/plugin.vim

                        Just tried it and got just 'noexpandtab' without 'Last set from' part.

                        Denis

                        --
                        --
                        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.