moll / vim-node

Tools and environment to make Vim superb for developing with Node.js. Like Rails.vim for Node.
http://www.vim.org/scripts/script.php?script_id=4674
Other
807 stars 59 forks source link

gf on require() of core modules #10

Open phillipwei opened 10 years ago

phillipwei commented 10 years ago

Hi,

New to vim-node so forgive me if I'm misusing or have misconfigured something.

I'm hitting 'gf' on a require("fs") statement. It's navigating to the core fs module but does two things I'm not expecting:

  1. Fetching the file over curl a-new each time (even if I've just navigated to it a few moments ago). I'm sometimes offline, so some reasonable caching defaults (or local-db fallback option) would be good -- not to mention, internet speeds are fast but non-zero.
  2. The opened module is replacing the existing buffer -- my natural instinct of hitting ':q' to return closes everything out. I could use ':e#' but I think we should be going back to the previous buffer by default on ':q'?

Thanks, Phil

moll commented 10 years ago

Hey!

Thanks for giving Node.vim a try!

I'll get back to you on point 1, but point 2 is a common Vim issue. I actually have a plugin for that: https://github.com/moll/vim-bbye. :-)

You can also open the module in a split with <C-w>f (<C-w>gf for a tab split).

phillipwei commented 10 years ago

Ah, great. f/gf makes sense. Thanks for the fast reply.