Git Product home page Git Product logo

vim-codesearch's Introduction

Chromium Codesearch Plugin for Vim

Integrates Chromium CodeSearch into Vim. When combined with additional plugins (e.g. vim-fugitive) should make it totally unnecessary to leave your editor to visit https://cs.chromium.org.

Examples of what's currently possible:

  • Search from within Vim and visit a rendered search results buffer. <Enter> takes you to the corresponding file in the local working directory.

    screencast

  • Look up cross references for the symbol under the cursor. The crossreferences are displayed in a new buffer which allows navigation to corresponding files in the local working directory.

    screencast

  • Look up the call graph for a symbol under the cursor. The graph can be expanded incrementally and support navigation similar to other rendered buffers.

    screencast

  • Load all possible call targets for a function call under the curser into the quickfix list.

    screencast

  • And more!

Caveats

The index at https://cs.chromium.org is updated regularly. The cross reference information is only accurate to the extent that your working directory matches what was indexed. If they diverge, you may notice that the jump targets don't match the snippets displayed, or worse, cross references are incorrect.

Installation

Use your favorite plugin manager.

call vundle#begin()
" Other plugins
Plugin 'chromium/vim-codesearch'
" More plugins
call vundle#end()
call plug#begin()
" Other plugins
Plug 'chromium/vim-codesearch'
" More plugins
call plug#end()

Documentation

Once installed, you should be able to run :help crcs.txt to view the help file. As with all Vim plugins, all documentation should go there.

TODO/Wishlist

  1. Better exception handling. Since the plugin is very much in alpha, exceptions are exposed to vim. This makes it handy for debugging, but is a pain for end-users, if there are any.

  2. Show the commit that was last indexed by codesearch and warn if a jump target differs from the version of the file that was indexed. Optionally allow loading the indexed source file instead of the file in the work directory.

  3. Make it easier for end-users to add custom tours. (See help crcs-tours for information on tours).

  4. Add a mode and hooks for code exploration and code auditing.

  5. Deal better with generated files.

  6. Narrow search results based on a gn build target.

Contributing

NOTE: This is not an official Google product.

See CONTRIBUTING.

vim-codesearch's People

Contributors

asankah avatar

Watchers

 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.