Zeljko Vrba <[EMAIL PROTECTED]> wrote:

> On 2005-12-07, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> >
> > What I don't understand is, that most people who have a problem
> > with scope by indentation, want to introduce braces. I think
> > braces are the worst solution.
> >
> Braces are very convenient to match block start and end. Open a C program
> in the VI editor, and press % in command mode on some brace.. It will take
> you to its matching brace. How do you do something like that with python code
> (or any code that is based purely on indentation..)

By programming % to match indentation (in Python syntax mode) when the
character under the cursor when % is hit is not a parenthesis, of
course; much the same approach as you use to have it jump between
opening and closing tags when you're editing an XML or HTML file, except
that matching indentation may be somewhat easier.  You can find many vim
programming tips at www.vim.org much more easily than in this group (you
CAN program vim with Python if you wish, rather than having to use vim's
own scripting language, but for that you need to build VIM with Python
scripting enabled in the first place).


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to