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
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.
Any advice on how to fix this would be appreciated. Thanks.
What does Vim answer to
? Maybe the settings are different on both systems. Or if they are the
same, maybe you are using different versions of
$VIMRUNTIME/ftplugin/python.vim and/or $VIMRUNTIME/indent/python.vim --
check the "Last Change" date in a comment near the top of each script.