Thursday, June 24, 2010

Re: How to jump from to the begin or the end of a python function (or method)

On 06/24/2010 11:55 AM, Peng Yu wrote:
>
> On Jun 23, 9:36 pm, AK <andrei....@gmail.com> wrote:
>
>> On 06/23/2010 10:31 PM, Peng Yu wrote:
>>
>>
>>> In other language that use braces (like C++), it is easier to jump to
>>> the begin and the end of a function or a class. But python don't use
>>> them. Is there a way to jump to the begin and the end of a python
>>> function, class or member method?
>>>
>> I use /^\s*def\s\|^\s*class\s.
>>
> I want to make a shortcut to such a search. I know how to map command
> (staring with :). Is it the same to map searches? Would you please
> show me how to do it?
>
>

Yes, something like: noremap \p /^\s*def\s\|^\s*class\s<CR>

-ak

--
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

No comments: