PSU uses emacs?

Ray Drew ray_drew at yahoo.co.uk
Mon Jan 29 05:24:30 EST 2001


On Wed, 24 Jan 2001 07:18:19 -0800, Neil Schemenauer <nas at arctrix.com>
wrote:

>really necessary.  Here is the Python line from my .vimrc:
>
> au BufEnter *.py set sw=4 sts=4 et ai cindent cino=(0 cinkeys=!^F,o,O tw=74
>
>The cindent options make Vim indent similarly to python-mode in
>Emacs.
>
>  Neil
>

I'm now running with au BufEnter *.py set sw=4 sts=4 et ai cindent
cino=(0 cinkeys=!^F,o,O tw=74 in my _vmrc file, but this is the
behaviour I'm getting...

def fun(x):	(1)
    if x:		(2)
        y		(3)
    else		(4)

after line 1, cursor is in leftmost position, I have to tab to indent
the if block.
after line 2, cursor under the i of if, I have to tab again for the
next line.
after line 3 , cursor is under the y. I now need to backtab for the
else but can't use the backspace key to do it, I either have to hit
the 'home' key to get to the start of the line and then tab my way
back or switch to command mode and hit the 'h' key 4 times (or hit the
left arrow key 4 times in 'insert' mode).

The behaviour I'd like is for the cursor to autoindent for lines 2 and
3 and for the backspace key to move me back a tab in line 4. Can I get
gvim to work like this?

I've tried using si instead of ci and I've tried setting cinw to the
python keywords that require indenting on the following line.

I've got syntax on.

Thanks for any help,

Ray




More information about the Python-list mailing list