sponsor Vim development Vim logo Vim Book Ad

node : Tools to make Vim superb for developing with Node.js. Like Rails.vim for Node.

 script karma  Rating 36/14, Downloaded by 1046    Comments, bugs, improvements  Vim wiki

created by
Andri Möll
 
script type
utility
 
description
Tools to make Vim superb for developing with Node.js.
It's the Node equivalent of Rails.vim (vimscript #1567) and Rake.vim (vimscript #3669).

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 (andri@dot.ee), Twitter (https://twitter.com/theml) GitHub issues (https://github.com/moll/vim-node/issues) so we could incorporate them here, too! Thanks!

Tour:
- Use gf on paths or requires to open the same file Node.js would.
- Use gf on require(".") to open ./index.js
- Use gf on require("./dir") to open ./dir/index.js
- Use gf on require("./foo") to open foo.js.
- Use gf on require("./package") and have it open package.json.
- Use gf on require("module") to open the module's main file (parsed for you from package.json).
- Use gf on require("module/lib/utils") and open files inside the module.
- Automatically sets the filetype to JavaScript for files with Node's shebang (#!).
- Use [I etc. to look for a keyword in required files (Sets Vim's &include).
- Use :Nedit to quickly edit any module, file in a module or your project file.
- Use :Nopen to quickly edit any module and lcd to its directory.
- 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!

Latest development version and more info with full README at https://github.com/moll/vim-node.
 
install details
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
node-0.8.1.zip 0.8.1 2014-04-15 7.0 Andri Möll - Updates the URL from which Node.vim downloads Node core module source files.  
  Uses <http://rawgit.com>; which used to be named <http://rawgithub.com>.  ;
  Because of Vim Netrw's inability to handle HTTPS, it does so over HTTP. Sorry.
node-0.8.0.zip 0.8.0 2013-09-06 7.0 Andri Möll - Adds `node` as a core module so you could use `:Nedit node` to open the file Node uses to bootstrap its core.
node-0.7.0.zip 0.7.0 2013-08-28 7.0 Andri Möll - Adds support for opening core Node.js modules, such as `http`, `util`, etc. with `gf` or `:Nedit`.
  They're shown straight from Node's online repository without you having to download everything.
node-0.6.0.zip 0.6.0 2013-08-23 7.0 Andri Möll - Adds `:Nedit` command for editing modules or files relative to the Node project root.
  For example: `:Nedit any-module/lib` or `:Nedit ./package`.
- Adds `:Nopen` command which behaves like `:Nedit`, but also `lcd`s to the module's directory.
- Makes `<Plug>NodeGotoFile` available for your mapping in any Node project file, but maps it to `gf` automatically only on JavaScript files.
- Maps `gf` also for JSON files for easy jumping to modules.
- Makes `:Nedit` and `:Nopen` available immediately when starting Vim in a directory of a Node project.
node-0.5.1.zip 0.5.1 2013-08-07 7.0 Andri Möll - Adds `Node` autocommand.  
  Use it with `autocmd User Node` to customize settings for files in Node projects.
- Adds `<Plug>NodeVSplitGotoFile` for those who want `<C-w>f` to split vertically.
node-0.5.0.zip 0.5.0 2013-08-05 7.0 Andri Möll - Adds `&include` pattern so Vim can recognize included/required files, e.g. for looking up keywords with `[I`.
- Cleans `&path` from `/usr/include` for JavaScript files.
- Adds a new superb `gf` handler to handle all relative and module paths, incl. support for `require(".")` to open `./index.js`. This is spot on how Node.js finds your requires.
- Adds `<Plug>NodeGotoFile` should you want to remap Node.vim's file opener.
- Opens files before directories should both, e.g. `./foo.js` and `./foo`, exist. This matches Node.js's behavior.
- Adds a full automated integration test suite to Node.vim which is freaking amazing!
node-0.2.0.zip 0.2.0 2013-07-28 7.0 Andri Möll - Adds full support for navigating to module files by using `gf` on `require("any-module")`.
- Adds `.json` to `&suffixesadd` so you could use `gf` on `require("./package")` to open package.json.
node-0.1.1.zip 0.1.1 2013-07-28 7.0 Andri Möll - Removes an innocent but forgotten debugging line.
node-0.1.0.zip 0.1.0 2013-07-28 7.0 Andri Möll Initial upload
ip used for rating: 54.196.159.11

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo