node : Tools to make Vim superb for developing with Node.js. Like Rails.vim for Node.
| script karma
Downloaded by 1616
Comments, bugs, improvements
script versions (upload new version)
|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 (email@example.com), Twitter (https://twitter.com/theml) GitHub issues (https://github.com/moll/vim-node/issues) so we could incorporate them here, too! Thanks!
- 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.
- 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.
Click on the package to download.
ip used for rating: 188.8.131.52
||- 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.
||- Adds `node` as a core module so you could use `:Nedit node` to open the file Node uses to bootstrap its core.
||- 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.
||- 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.
- 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.
||- 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.
||- Adds `&include` pattern so Vim can recognize included/required files, e.g. for looking up keywords with `[I`.
- 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!
||- 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.
||- Removes an innocent but forgotten debugging line.