diff --git a/README.md b/README.md index 7d63374..3903add 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,13 @@ autocmd User Node \ endif ``` +#### Want to resolve modules with a custom NODE_PATH? + +```vim +let g:vim_node#node_path = [$HOME.'/project/src', '/absolute/path'] +``` + +Or you can also start vim with the `NODE_PATH` environment variable set. License ------- diff --git a/autoload/node.vim b/autoload/node.vim index c020e3a..bc8171f 100644 --- a/autoload/node.vim +++ b/autoload/node.vim @@ -50,8 +50,6 @@ function! s:edit(name, from, ...) if empty(a:name) | return | endif let dir = isdirectory(a:from) ? a:from : fnamemodify(a:from, ":h") let command = a:0 == 1 ? a:1 : "edit" - - " If just a plain filename with no directory part, check if it exists: let path = node#lib#find(a:name, dir) if empty(path)