how to jump between ifeq and endif in Makefile ?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

how to jump between ifeq and endif in Makefile ?

robertsong

hello,everyone.
Is there any shortcut key that can quickly jump from endif to the
corresponding ifeq in Makefile ?

Best wishes,
robert

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: how to jump between ifeq and endif in Makefile ?

Gary Johnson-4

On 2009-03-11, robert song wrote:
> hello,everyone.
> Is there any shortcut key that can quickly jump from endif to the
> corresponding ifeq in Makefile ?

If you source the matchit.vim plugin, e.g., by putting

    runtime macros/matchit.vim

in your .vimrc, you can use the % key to cycle through the ifeq,
else and endif lines.

For more info, see

    :help matchit

Regards,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: how to jump between ifeq and endif in Makefile ?

Tony Mechelynck

On 11/03/09 08:01, Gary Johnson wrote:

>
> On 2009-03-11, robert song wrote:
>> hello,everyone.
>> Is there any shortcut key that can quickly jump from endif to the
>> corresponding ifeq in Makefile ?
>
> If you source the matchit.vim plugin, e.g., by putting
>
>      runtime macros/matchit.vim
>
> in your .vimrc, you can use the % key to cycle through the ifeq,
> else and endif lines.
>
> For more info, see
>
>      :help matchit
>
> Regards,
> Gary

...and for full info, either (in Windows or any OS where soft links are
either unknown or hard to control) copy $VIMRUNTIME/macros/matchit.txt
to $HOME/vimfiles/doc/ -creating any needed directory as we go along- or
(under Unix/Linux/etc.) link it by doing (in bash or similar) something like

        cd /usr/local/share/vim
        ln -sv vim72 latest
        mkdir -pv ~/.vim/doc
        cd ~/.vim/doc
        ln -sv /usr/local/share/vim/latest/doc/matchit.txt

then in Vim (for any OS):

        :if has('unix')|cd ~/.vim|else|cd ~/vimfiles|endif
        :helptags ./doc
        :cd -

Note that thanks to soft links, the above makes sure that, under
Unix/Linux, ":help matchit.txt" will always access the latest version of
the file, even across Vim versions if the $VIM/latest link is kept
current. (The ":helptags" command may need to be repeated when, if ever,
there is a change.) Under Windows, we will have to repeat the copy every
time there is a change in $VIMRUNTIME/macros/matchit.txt (which, to be
true, is quite seldom) and at every minor release of Vim.(which isn't
very often though still oftener than matchit releases).


Best regards,
Tony.
--
If everybody minded their own business, the world would go
around a deal faster.
                -- The Duchess, "Through the Looking Glass"

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: how to jump between ifeq and endif in Makefile ?

panshizhu

Tony Mechelynck 写道:
> ...and for full info, either (in Windows or any OS where soft links are
> either unknown or hard to control) copy $VIMRUNTIME/macros/matchit.txt
> to $HOME/vimfiles/doc/ -creating any needed directory as we go along- or
> (under Unix/Linux/etc.) link it by doing (in bash or similar) something like

Why the standard way is to recommend users to "copy" instead of just
source them?

I have the following line in my .vimrc:

runtime macros/matchit.vim

and IMO it is far better than copy the file into plugin directory, since
we source from the standard directory we don't worry about when the
script updates.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: how to jump between ifeq and endif in Makefile ?

Christian Ebert

* pansz on Friday, March 13, 2009 at 14:04:06 +0800
> Why the standard way is to recommend users to "copy" instead of just
> source them?

Perhaps to seduce the users to copy matchit.txt as well?

> I have the following line in my .vimrc:
>
> runtime macros/matchit.vim
>
> and IMO it is far better than copy the file into plugin directory, since
> we source from the standard directory we don't worry about when the
> script updates.

Same here. Plus symlink ~/.vim/doc/matchit.txt to have the help.

c
--
\black\trash movie    _C O W B O Y_  _C A N O E_  _C O M A_
Ein deutscher Western/A German Western
-->> http://www.blacktrash.org/underdogma/ccc.html
-->> http://www.blacktrash.org/underdogma/ccc-en.html

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: how to jump between ifeq and endif in Makefile ?

Tony Mechelynck
In reply to this post by panshizhu

On 13/03/09 07:04, pansz wrote:

>
> Tony Mechelynck 写道:
>> ...and for full info, either (in Windows or any OS where soft links are
>> either unknown or hard to control) copy $VIMRUNTIME/macros/matchit.txt
>> to $HOME/vimfiles/doc/ -creating any needed directory as we go along- or
>> (under Unix/Linux/etc.) link it by doing (in bash or similar) something like
>
> Why the standard way is to recommend users to "copy" instead of just
> source them?
>
> I have the following line in my .vimrc:
>
> runtime macros/matchit.vim
>
> and IMO it is far better than copy the file into plugin directory, since
> we source from the standard directory we don't worry about when the
> script updates.

I have the same line as a separate file,
$VIM/vimfiles/plugin/matchit.vim -- so it is run together with other
global plugins, but, as you noted, from the latest version of the
distributed script.

-- Not that it changes very often: the current version is "for Vim
6.3+", dated 25-Jan-2008.


Best regards,
Tony.
--
A M00se once bit my sister ...
                  "Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---