vim-classpath


Ⅰ. 插件描述

classpath.vim: Set 'path' from the Java class path

Ⅱ. 基本信息

创建日期:  2013-01-07
使用用户:  591
Github星:  98
插件作者:  Tim Pope

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# classpath.vim

This plugin sets the 'path' for JVM languages to match the class path of
your current Java project. This lets commands like :find and gf work as

  1. I originally wrote it for Clojure, but I see no reason why it
    wouldn't be handy for other languages as well.

Currently, [Maven][] and [Leiningen][] are supported, with a fallback to
$CLASSPATH if neither applies. Open an issue if you have
ideas for supporting another project management system.

Included is a :Java command, which executes java (or $JAVA_CMD) with the
current buffer's 'path' as the class path.

Installation

If you don't have a preferred installation method, I recommend
installing pathogen.vim, and
then simply copy and paste:

cd ~/.vim/bundle
git clone git://github.com/tpope/vim-classpath.git

Once help tags have been generated, you can view the manual with
:help classpath.

FAQ

Why does it take so long for Vim to startup?

The short answer is because the JVM is slow.

The first time you load a Clojure file from any given project, classpath.vim
sets about trying to determine your class path, leveraging either
lein classpath or mvn dependency:build-classpath. This takes a couple of
seconds or so in the best case scenario, and potentially much longer if it
decides to hit the network.

Because the class path is oh-so-expensive to retrieve, classpath.vim caches it
in ~/.cache/vim/classpath. The cache is expired when the timestamp on
project.clj or pom.xml changes.

Contributing

See the contribution guidelines for
pathogen.vim.

Self-Promotion

Like classpath.vim? Follow the repository on
GitHub. And if
you're feeling especially charitable, follow tpope on
Twitter and
GitHub.

License

Copyright © Tim Pope. Distributed under the same terms as Vim itself.
See :help license.

添加新评论