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

Re: Extra spaces when autoindenting

Expand Messages
  • A.J.Mechelynck
    ... If you have left your shiftwidth at its default of 8, indenting by n shiftwidths will result (with your nonstandard setting of ts=6) into n + floor(n/4)
    Message 1 of 3 , Sep 1, 2006
    • 0 Attachment
      Evan Silberman wrote:
      > For any filetype, autoindenting (rather, filetypeindent) has suddenly
      > started adding 2n extra spaces after n autotabs. (I have :set noet,
      > :set ts=6) I have no idea what option might be doing this, or why it
      > got set, but it's infuriating. Can anybody help point me in the right
      > direction?
      >
      > Much obliged.
      >
      > E. Silberman
      >

      :verbose set shiftwidth?

      If you have left your 'shiftwidth' at its default of 8, indenting by n
      shiftwidths will result (with your nonstandard setting of ts=6) into n +
      floor(n/4) hard tabs plus (2n mod 8) spaces.

      Note: If 'noexpandtab' is set, using any value other than 8 for
      'tabstop' will make your files non-portable, i.e., other editors will
      interpret your hard tabs differently than you do.


      Best regards,
      Tony.
    • Evan Silberman
      Aha. That s exactly what I was looking for. Thanks for your help.
      Message 2 of 3 , Sep 1, 2006
      • 0 Attachment
        Aha. That's exactly what I was looking for. Thanks for your help.

        On 9/1/06, A.J.Mechelynck <antoine.mechelynck@...> wrote:
        > Evan Silberman wrote:
        > > For any filetype, autoindenting (rather, filetypeindent) has suddenly
        > > started adding 2n extra spaces after n autotabs. (I have :set noet,
        > > :set ts=6) I have no idea what option might be doing this, or why it
        > > got set, but it's infuriating. Can anybody help point me in the right
        > > direction?
        > >
        > > Much obliged.
        > >
        > > E. Silberman
        > >
        >
        > :verbose set shiftwidth?
        >
        > If you have left your 'shiftwidth' at its default of 8, indenting by n
        > shiftwidths will result (with your nonstandard setting of ts=6) into n +
        > floor(n/4) hard tabs plus (2n mod 8) spaces.
        >
        > Note: If 'noexpandtab' is set, using any value other than 8 for
        > 'tabstop' will make your files non-portable, i.e., other editors will
        > interpret your hard tabs differently than you do.
        >
        >
        > Best regards,
        > Tony.
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.