GithubHelp home page GithubHelp logo

vim-classpath's Introduction

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

vim-classpath's People

Contributors

tpope avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.