Tools to make Vim superb for developing with Node.js.
- Use
gf
on paths or requires to open the same file Node.js would. - Use
gf
onrequire(".")
to open./index.js
- Use
gf
onrequire("./dir")
to open./dir/index.js
- Use
gf
onrequire("./foo")
to openfoo.js
. - Use
gf
onrequire("./package")
and have it open package.json. - Use
gf
onrequire("module")
to open the module's main file (parsed for you frompackage.json
). - Use
gf
onrequire("module/lib/utils")
and open files inside the module.
To install using Vundle:
" add this line to your .vimrc file
Plugin 'feix760/vim-javascript-gf.vim'
or:
git clone https://github.com/feix760/vim-javascript-gf.vim.git
cp -r vim-javascript-gf.vim/* ~/.vim/
Open any JavaScript file inside a Node project and you're all set.
- Use
gf
insiderequire("...")
to jump to source and module files.