This is just the first release to get the nodes rolling. If you've collected great helpers and shortcuts that help you work with Node, please share them via email, Twitter or GitHub issues so we could incorporate them here, too! Thanks!
gfon paths or requires to open the same file Node.js would.
require("./package")and have it open package.json.
require("module")to open the module's main file (parsed for you from
require("module/lib/utils")and open files inside the module.
[Ietc. to look for a keyword in required files (Sets Vim's
:Neditto quickly edit any module, file in a module or your project file.
:Nopento quickly edit any module and
lcdto its directory.
- Lets you even open Node's core modules. They're shown straight from Node's online repository without you having to download everything.
- Node.vim itself is tested with a thorough automated integration test suite! No cowboy coding here!
Expect more to come soon and feel free to let me know what you're after!
PS. Node.vim is absolutely intended to work on Windows, but not yet tested there at all. If you could help, try it out and report issues, I'd be grateful!
The easiest and most modular way is to download this to
mkdir -p ~/.vim/bundle/node
git clone https://github.com/moll/vim-node.git ~/.vim/bundle/node
wget https://github.com/moll/vim-node/archive/master.tar.gz -O- | tar -xf- --strip-components 1 -C ~/.vim/bundle/node
Then prepend that directory to Vim's
&runtimepath (or use Pathogen):
Or use Vundle:
require("...")to jump to source and module files.
[Ion any keyword to look for it in the current and required files.
:Nedit module_nameto edit the main file of a module.
:Nedit module_name/lib/footo edit its
:Nedit .to edit your Node projects main (usually
Want to customize settings for files inside a Node projects?
Node autocommand. For example:
<C-w>f to open the file under the cursor in a new vertical split?
<C-w>f by default opens it in a horizontal split. To have it open vertically, drop this in your
Node.vim is released under a Lesser GNU Affero General Public License, which in summary means:
- You can use this program for no cost.
- You can use this program for both personal and commercial reasons.
- You do not have to share your own program's code which uses this program.
- You have to share modifications (e.g bug-fixes) you've made to this program.
For more convoluted language, see the