Basically, my intent is to make up for the lack of brace-delineated
blocks - in C or perl, I could just put my cursor on the opening
brace, hit % and be at the end.  Since I have no braces in python,
this is a poor-man's version of that.


On May 13, 9:20 am, Charles Smith <cts.private.ya...@gmail.com> wrote:
> On May 13, 12:14 am, Marc Weber <marco-owe...@gmx.de> wrote:
>
> > Excerpts from Charles Smith's message of Sun May 12 12:08:15 +0200 2013:
>
> > > In order to be able to go to the next command in python, I'd like to
> > > have a mapping as follows, but I can't get it to work:
>
> > >   map ]0 /^\s\{0,^R=wincol()}\S^M
>
> > Can you retry telling us what you mean by "next command"?
>
> Python delineates scope merely with indentation.  I mean the next
> command in the same scope.  So, given the python snippet (this is,
> btw, no endorsement of python):
>
>     for i in f():
>
>         print i
>
>     print "done"
>
> exit
>
> if my cursor is on the first line (e.g. on the first char of the first
> line), I want to be able to skip to print (or to exit if there were no
> print)
>
> So, I want to look for the next line that has as much white space at
> the beginning as the line where the cursor currently is - or has less
> white space, meaning that the section is over.
>
> The strategy is to use \{0,x}, where x is the builtin-function
> wincol().  I'm trying to use the ^R= evaluation operation but vim
> complains with:
>
>   E554: Syntax error in \{...}
>
>
>
>
>
>
>
> > Plugins like ttoc may be close.
>
> > Usually using / ? searches are fastest for navigation. (eg /r n to jump
> > to "for navigation")
>
> > Marc Weber

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to