Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
VimL JavaScript
branch: master
Failed to load latest commit information.
ftplugin Adding all the possible type errors
screenshots Check in screenshots
Readme.md Hook core files into quickfix window
example.js Initial readme

Readme.md

nodejs-errorformat

A simple vim plugin that allows to execute any opened node.js file with :make and provides errorformat settings that allow you to quickly jump to any file / line numbers referenced in a stack trace.

Install

Get pathogen, then:

cd ~/.vim/bundle
git clone git://github.com/felixge/vim-nodejs-errorformat.git

Usage

If you already know how :make and the quickfix window work in vim, just type :make inside of a JS file to have it executed with node, then type :copen to show the quickfix window.

However, if you are new to this, you probably want a keybinding like this in your .vimrc

nmap <Leader><Leader> :w<CR>:make! \| botright cwindow<CR>

This will map <leader><leader> (,, for me) to excuting :make and automatically opening the quickfix window if there was an error.

Screenshots

A simple JS file before executing the keybinding above:

Screenshot 1

The output of :make / running the file with node.js:

Screenshot 2

The quickfix window generated by this plugin:

Screenshot 3

Something went wrong with that request. Please try again.