On Wed, Aug 23, 2006 at 04:49:46PM -0500, Lloyd Sartor wrote:
>"William O'Higgins Witteman" <[EMAIL PROTECTED]> wrote on 08/23/2006 
>12:49:02 PM:
>
>> On Wed, Aug 23, 2006 at 06:58:47PM +0200, A.J.Mechelynck wrote:
>> >William O'Higgins Witteman wrote:
>> >>When coding in Python, I have a little mapping which helps me create
>> >>function declarations (and something similar for class definitions 
>too).
>> >>It looks like this:
>> >>
>> >>inoremap def def ():<cr><tab>""""""<up><left><left><left>
>> >>
>> >>On Linux, it works perfectly - my ts = 2, and I get this when I type
>> >>"def ":
>> >>
>> >>def |():
>> >>  """"""
>> >>
>> >>Where the pipe character is the cursor.
>> >>
>> >>However, with Windows, and a nearly identical _vimrc, when I use the
>> >>above mapping I get 4 spaces (expandtab is set) before the quotation
>> >>marks, instead of two.  Typing a tab still moves me two spaces, so 
>ts=2
>> >>is still set, but I'm getting too big a tab in this mapping.  All of 
>the
>> >>places where I declare a <tab> generate the same behavior.
>> yours,
>
>Check the setting of softtabstop. With ts=2 and sts=4, vim tabbed to the 
>next column that is a multiple of 4, not 2.

Okay, I think that this is solved, but I'm not sure why.  It seems to be
a combination of the softtabstop and the filetype indent settings.

If I set "filetype indent off" and "set sts=2" in my _vimrc, I get the
behaviour I am looking for.  Thanks to Llyod and Tony - hopefully this
helps someone else one day.
-- 

yours,

William

Reply via email to