Gary,
On 2009-08-12 03:27, Gary Johnson wrote:
> On 2009-08-11, Philip Rhoades wrote:
>
>> On 2009-08-11 15:37, Gary Johnson wrote:
>>> On 2009-08-10, drostin77 wrote:
>>>> I am coding more and more ruby, and I am missing the ability to hit % and
>>>> have vim take me to the start/end of the block I am on.
>>>>
>>>> I.e.
>>>>
>>>> if vimCanDoThis
>>>> happy = true
>>>> else
>>>> happy = false
>>>> end
>
>> When I do this and the cursor is on the "if":
>>
>> - the first "%" puts the cursor on the "else"
>> - the second "%" puts the cursor on the "end"
>> - the third "%" puts the cursor back on the "else"
>>
>> ie there does not seem to be an option to get back to the "if" from the
>> "end" . .
>
> It works fine for me. I copied your example code into a file named
> foo.rb and opened it. Typing % caused the cursor to jump from "if"
> to "else" to "end" and back to "if".
>
> For that test I was using vim 7.2.148 on Cygwin with matchit.vim
> version 1.13.1 (one version older than the latest) and
> ftplugin/ruby.vim version 1.40 2008/06/29 04:18:43.
Very odd - I thought from what had been written that on Linux everything
needed was installed with vim so I just put these lines in my .vimrc file:
filetype plugin on
runtime plugin/matchit.vim
But when I checked, the matchit plugin was not there so I downloaded and
installed it but still no improvement so I read the doc (!) and changed
the last line in .vimrc to:
:source ~phil/.vim/plugin/matchit.vim
but still no joy. What is really odd is that "g%" ie the reverse
movement works fine!
I have:
vim v7.2.148-1
matchit.vim v1.13.2, for Vim 6.3+
Thanks,
Phil.
--
Philip Rhoades
GPO Box 3411
Sydney NSW 2001
Australia
E-mail: [email protected]
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---