vim-javascript-gf


Ⅰ. 插件描述

vim plugin for javascript to go to file

Ⅱ. 基本信息

创建日期:  2017-03-08
使用用户:  1
Github星:  3
插件作者:  Fishine Yuan

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'feix760/vim-javascript-gf'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'feix760/vim-javascript-gf'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'feix760/vim-javascript-gf'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/feix760/vim-javascript-gf

Ⅳ. 文档说明

vim-javascript-gf.vim

Tools to make Vim superb for developing with Node.js.

Tour

  • 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.

Installing

To install using Vundle:

" add this line to your .vimrc file
Plugin 'feix760/vim-javascript-gf.vim'

or:

git clone https://github.com/feix760/vim-javascript-gf.vim.git
cp -r vim-javascript-gf.vim/* ~/.vim/

Using

Open any JavaScript file inside a Node project and you're all set.

  • Use gf inside require("...") to jump to source and module files.

添加新评论