Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #48795
| References | <CAPTjJmqJeab8aCihPxbTqhUYkyD089FuftTRLfhMsYTg3J+ZaA@mail.gmail.com> <20130620031113.GA85034@cskk.homeip.net> |
|---|---|
| From | Oscar Benjamin <oscar.j.benjamin@gmail.com> |
| Date | 2013-06-20 15:33 +0100 |
| Subject | Re: Problem with the "for" loop syntax |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3624.1371738816.3114.python-list@python.org> (permalink) |
On 20 June 2013 04:11, Cameron Simpson <cs@zip.com.au> wrote:
> I use vi/vim and it both shows the matching bracket when the cursor
> is on one and also have a keystroke to bounce the curser between
> this bracket and the matching one.
>
> If you suspect you failed to close a bracket, one approach is to
> go _below_ the syntax error (or right on it) and type a closing
> bracket. Then see where the editor thinks the opening one is.
I use this technique sometimes and it works if the unclosed bracket is
still in view.
If you use vim then you can do [( i.e. type '[' followed by '(' in
normal mode. It will jump backwards to the first unmatched opening
bracket. Use ]) to find the next unmatched closing bracket. You can
also do [{ and ]} for curly brackets. I'm not sure how to do square
brackets - [[ and ]] are used for navigating between functions.
Oscar
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Problem with the "for" loop syntax Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-06-20 15:33 +0100
csiph-web