vim-node icon indicating copy to clipboard operation
vim-node copied to clipboard

gf on require() of core modules

Open phillipwei opened this issue 12 years ago • 2 comments

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

phillipwei avatar Oct 27 '14 17:10 phillipwei

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

moll avatar Oct 27 '14 17:10 moll

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

phillipwei avatar Oct 27 '14 17:10 phillipwei