Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felixge/vim-nodejs-errorformat
https://github.com/felixge/vim-nodejs-errorformat
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/felixge/vim-nodejs-errorformat
- Owner: felixge
- Created: 2011-12-21T17:53:47.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2022-03-21T08:00:58.000Z (almost 3 years ago)
- Last Synced: 2024-12-18T05:44:16.866Z (6 days ago)
- Language: VimL
- Homepage:
- Size: 298 KB
- Stars: 36
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# 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 :w:make! \| botright cwindow
```
This will map `` (`,,` 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](https://github.com/felixge/vim-nodejs-errorformat/raw/master/screenshots/1.png)
The output of `:make` / running the file with node.js:
![Screenshot 2](https://github.com/felixge/vim-nodejs-errorformat/raw/master/screenshots/2.png)
The quickfix window generated by this plugin:
![Screenshot 3](https://github.com/felixge/vim-nodejs-errorformat/raw/master/screenshots/3.png)
[pathogen]: https://github.com/tpope/vim-pathogen