Re: evaluating vim functions in search mappings

2013-05-14 Thread Ben Fritz
On Tuesday, May 14, 2013 7:18:34 AM UTC-5, Charles Smith wrote: But I guess it's just not possible to invoke a vim function from within \{} - or maybe it's a lost art What gave you that idea? You tried using CTRL-R to get the expression register in a mapping, which can be done,

Re: evaluating vim functions in search mappings

2013-05-13 Thread Charles Smith
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

Re: evaluating vim functions in search mappings

2013-05-13 Thread Charles Smith
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

Re: evaluating vim functions in search mappings

2013-05-13 Thread Marc Weber
:h indent() returns indentation of current line. Thus :map X /^c-r=repeat(' ', indent(line('.')))cr\Scr or such might do it. A second solution would be using folding. In the end - you should try using better search terms. Eg googling for indendation based movement vim

Re: evaluating vim functions in search mappings

2013-05-13 Thread Charles Smith
Thanks Marc. Unfortunately, I couldn't get your suggestion to work: :map ]0 /^^R=repeat(' ', indent(line('.')))\S =repeat(' ', indent(line('.')))\S E15: Invalid expression: repeat(' ', indent(line('.')))\S and using the original mapping, modified to use the indent() function :map ]0

Re: evaluating vim functions in search mappings

2013-05-13 Thread Marc Weber
Reread my message. I told you many ways to reach your goal. One was clear: http://vim.wikia.com/wiki/Move_to_next/previous_line_with_same_indentation I didn't test my mapping, yes - you may have to understand the pieces to make it work - so if you have trouble understanding the pieces ask

Re: evaluating vim functions in search mappings

2013-05-13 Thread Charles Smith
Right, Marc, I see you're a busy man. Hopefully somebody else will feel intrigued by the problem and jump in. On May 13, 12:46 pm, Marc Weber marco-owe...@gmx.de wrote: Reread my message. I told you many ways to reach your goal. One was

evaluating vim functions in search mappings

2013-05-12 Thread Charles Smith
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 I'm not getting the evaluation correct. Can someone help?

Re: evaluating vim functions in search mappings

2013-05-12 Thread Marc Weber
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?

evaluating vim functions in search mappings

2013-05-11 Thread cts.private
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 I'm not getting the evaluation correct. Can someone help?