On 8/23/06, William O'Higgins Witteman <[EMAIL PROTECTED]> 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.
Any advice on how to fix this would be appreciated. Thanks.
Since you have expandtab set ... why can't you insert right number
of spaces into rhs of the mapping instead of <tab> ? Like this:
inoremap def def ():<cr> """"""<up><left><left><left>
Yakov