Sunday, March 21, 2010

Jump to Javascript function prototype

Hi there Vim gurus,

What I'm trying to achieve is to be able to preview Javascript
function prototypes. The prototypes will exist as function stubs in an
external file.

The important difference with Javascript is that there is no
equivalent to #include. (Web developers usually use the HTML <script>
tags to import multiple Javascript file)

Therefore, I have investigated the following three avenues. Each
option has it's own set of problems, so I'm looking for help on which
way is best/easiest:

1. CTRL-W }

Seems exactly like what I want, but requires me to build a tags file
and include it in every folder where I have .js files.

My function prototypes are global, is there some way to have a
"global" tags file in a central location? eg. under $VIM?

2. [I

Jumps to matches for the current keyword, looking in all included
files. Unfortunately, Javascript has no #include equivalent.

Can I manually forces files into the list that the include commands
search?

3. K

This displays help for the keyword under the cursor, using a program
such as "man". I can make this work, but is there a way to pipe the
output into the Vim preview window?

Any input greatly appreciated. Thanks in advance!
-Gareth

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: