Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Tools and environment to make Vim superb for developing with Node.js. Like Rails.vim for Node.
Ruby VimL
tag: v0.2.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ftdetect
plugin
test/support
CHANGELOG.md
LICENSE
Makefile
README.md

README.md

Node for Vim

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, Twitter or GitHub issues so we could incorporate them here, too! Thanks!

Installing

The easiest and most modular way is to download this to ~/.vim/bundle:

mkdir -p ~/.vim/bundle/node

Using Git:

git clone https://github.com/moll/vim-node.git ~/.vim/bundle/node

Using Wget:

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

set runtimepath^=~/.vim/bundle/node

Using

Currently Node for Vim does these things:

  • Sets the filetype to JavaScript for files with Node's shebang (#!).
  • Adds full support for navigating to modules by using gf on require("any-module"), require("any-module/lib/utils") and so on.
  • Adds .js to &suffixesadd so you could use gf on require("./foo") to open foo.js.
  • Adds .json to &suffixesadd so you could use gf on `require("./package") and have it open package.json. Node does this too.

Expect more to come soon and feel free to let me know what you're after right away.

License

Node for 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 LICENSE file.

About

Andri Möll authored this in SublemacslipseMate++.
Monday Calendar supported the engineering work.

If you find Node for Vim needs improving or you've got a question, please don't hesitate to email me anytime at andri@dot.ee, tweet at @theml or create an issue online.

Something went wrong with that request. Please try again.