Go Doctor 0.4 (Beta) Installation Guide

Do you use Vim?

 Yes           No

Installation for Vim Users

The Go Doctor Vim plug-in (godoctor.vim) follows the standard runtime path structure, so we recommend using a plug-in manager (like Pathogen) to install it. In addition, filetype plugin indent on must also be set (add this to your ~/.vimrc).

  • Pathogen
    • git clone https://github.com/godoctor/godoctor.vim.git \
      ~/.vim/bundle/godoctor.vim
  • vim-plug
    • Plug 'godoctor/godoctor.vim'
  • NeoBundle
    • NeoBundle 'godoctor/godoctor.vim'
  • Vundle
    • Plugin 'godoctor/godoctor.vim'
  • Manual
    • git clone https://github.com/godoctor/godoctor.vim ~/.vim/godoctor.vim
    • Add these lines to ~/.vimrc
      if exists("g:did_load_filetypes")
        filetype off
        filetype plugin indent off
      endif
      set rtp+=~/.vim/godoctor.vim
      filetype plugin indent on
      syntax on
      

If the godoctor executable is not already installed and in your $PATH, just type :GoDoctorInstall. This will install it to $GOPATH/bin, which will also need to be in your $PATH, which assumes you have $GOPATH set. git must be installed for :GoDoctorInstall to work.

We took express care not to conflict with anything in https://github.com/fatih/vim-go. This means (vim-go note aside) that it is safe to have vim-go installed alongside godoctor.vim. Notably, vim-go has :GoRename and :GoRefactor where we have :Rename and :Refactor when editing a .go file.

Installation for Users of Other Editors

At the moment, the Go Doctor only has a Vim plug-in. Contributing a plug-in for another editor (emacs, Sublime Text, etc.) would be a great way to contribute.

However, you can still use the Go Doctor command line tool. To install:

  • go get github.com/godoctor/godoctor
  • go install github.com/godoctor/godoctor

For examples of how to use the command line tool, see the godoctor man page, or install a local copy of the man page.