Coder Social home page Coder Social logo

vim-racer's Introduction

Vim Racer Plugin

This plugin allows vim to use Racer for Rust code completion and navigation.

Installation

  1. Build / Install Racer

  2. Install using Pathogen, Vundle or NeoBundle. Or, copy plugin/racer.vim into your ~/.vim/plugin directory.

Vundle users:

Plugin 'racer-rust/vim-racer'

NeoBundle users:

NeoBundle 'racer-rust/vim-racer'

vim-plug users:

Plug 'racer-rust/vim-racer'

Pathogen users:

git clone --depth=1 https://github.com/racer-rust/vim-racer.git ~/.vim/bundle/vim-racer
  1. Add g:racer_cmd and $RUST_SRC_PATH variables to your .vimrc. Also it's worth turning on 'hidden' mode for buffers otherwise you need to save the current buffer every time you do a goto-definition. E.g.:
set hidden
let g:racer_cmd = "<path-to-racer>/target/release/racer"
let $RUST_SRC_PATH="<path-to-rust-srcdir>/src/"
  1. If you want completions to show the complete function definition (e.g. its arguments and return type), enable the experimental completer:
let g:racer_experimental_completer = 1

Mappings

  • In insert mode use C-x-C-o to search for completions

  • In normal mode type gd to go to a definition

  • In normal mode type gs to splitted open a definition

  • In normal mode type gx to vsplitted open a definition

vim-racer's People

Contributors

12foo avatar bonsaiden avatar booyaa avatar chris-morgan avatar delusionallogic avatar dwink avatar elben avatar estebank avatar hk47196 avatar jakerr avatar johan-sun avatar kha avatar lilydjwg avatar mattwis avatar maurizi avatar nerdrew avatar o01eg avatar phildawes avatar rhysd avatar shougo avatar timokau avatar travv0 avatar yamakaky avatar zengsai avatar zsiciarz 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.