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

134562Re: shiftround option

Expand Messages
  • Marcin Szamotulski
    Nov 17 2:48 PM
      On 17:42 Sat 17 Nov , rail shafigulin wrote:
      > On Sat, Nov 17, 2012 at 4:16 PM, Christian Brabandt <cblists@...>wrote:
      >
      > > Hi rail!
      > > (please don't top poste)
      > >
      > > On Sa, 17 Nov 2012, rail shafigulin wrote:
      > >
      > > > I'm still no quite clear. So when I set shiftround it moves the code by
      > > the
      > > > length of shiftwidth-1 when I use the >> or << ?
      > >
      > > No, if it is set, it moves it to the next multiple value of shiftwidth,
      > > while when it is not set, it simply moves by shiftwidth chars.
      > >
      > > Here is an example:
      > > If your shiftwidth value is 4 and your input starts at cell 3 indenting
      > > using >> would move the text to cell 5 if shiftround is set, while it
      > > moves your text to cell 7 when shiftround is not set.
      > >
      > > regards,
      > > Christian
      > > --
      > > Den (inländischen) Ruhm großer Minister, Feldherrn, Fürsten stürzt
      > > eine einzige Staatsumwälzung oder Eroberung.
      > > -- Jean Paul
      > >
      > > --
      > > 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
      > >
      >
      > The "next multiple value of shiftwidth" confuses me. So if shiftwidth is 8,
      > will the next multiple be 2, 4 or 8? How about shiftwidth of 7, will the
      > next multiple be 7 ?
      >
      > Any help is appreciated.
      >
      > --
      > 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

      Indeed, if you set shift width to 7 and the first non blank character
      is at column 9 then '>>' will move it to the column 14 when 'shiftround'
      is set and to column 9+7=16 when it is not set. The operator << will
      move it to the column 7 when 'shiftround' is set and 9-7=2 when it is
      not set.

      Best,
      Marcin

      --
      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
    • Show all 8 messages in this topic