GithubHelp home page GithubHelp logo

farazdagi / vim-go-ide Goto Github PK

View Code? Open in Web Editor NEW
576.0 28.0 291.0 2.07 MB

Ready to use, fully configured for Go development.

Vim Script 99.23% Shell 0.15% Python 0.28% Ruby 0.10% Erlang 0.18% JavaScript 0.06%

vim-go-ide's Introduction

vim-go-ide

Get started with Go development in minutes!

0. What is this?

Quite simply this is a vim configuration which will setup all the necessary Go development environment (and plugins), without overwriting your current Vim settings. Basically, you will be able to use amazing vim-go plugin (plus number of others), without affecting your system's Vim configuration.

1. Prerequisites:

1.1 Install Go:

1.1.1 Mac

Create Directories

mkdir $HOME/.go
mkdir -p $HOME/.go/src/github.com/<user>

Setup your paths

export GOPATH=$HOME/.go
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin

Install Go

brew install go
"go get" the basics
go get golang.org/x/tools/cmd/godoc

1.2 Install pathogen:

mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

1.3 Install python and update plugins (Optional)

brew install python3
pip3 install requests
~/.vim_go_runtime/bin/update_plugins

2. Install vim-go-ide runtime:

Fork the repo, and then clone it to ~/.vim_go_runtime. Once done, just run installation script:

    git clone [email protected]:farazdagi/vim-go-ide.git ~/.vim_go_runtime
    sh ~/.vim_go_runtime/bin/install

NOTE: You system's Vim configuration will NOT be changed i.e. it is safe to install.

3. Run your newly installed Vim configuration:

Remember that your system's Vim config files remain untouched? During installation .vimrc.go is created. Let's use it:

vim -u ~/.vimrc.go

And btw, nothing prevents you from creation of a handy alias in your .zshrc:

alias vimgo='vim -u ~/.vimrc.go'

4. Setup necessary go tools (godep, gocode, godoc etc):

In order for the amazing vim-go to be most useful, run :GoInstallBinaries from w/i the Vim.

5. Recommended minimum profile setup:

~/.profile

export GOPATH=$HOME/.go
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin

alias vimgo='vim -u ~/.vimrc.go'

~/.bashrc

source ~/.profile

~/.zshrc

[[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile'

~/.bash-profile

if [ -f ~/.bashrc ]; then
   source ~/.bashrc
fi

6. End-result:

Screenshot

Yep, that's it!

7. Where to go from here?

  • You can also read a corresponding blog post.
  • You are highly advised to review vim-go docs (just typing :help vim-go is also good enough).
  • Review list of plugins installed (see bin/update_plugins), and default configuration that comes with this setup (see vimrc folder).
  • You can also define your custom settings in ~/.vim_go_runtime/custom_config.vim the runtime will try to load this file - so feel free to remap keys as you see necessary!

If you know some plugin that will enhance this setup and thus should be included - submit a PR

vim-go-ide's People

Contributors

farazdagi avatar gregpardo avatar marinbek avatar mjfroehlich avatar pedroarthur avatar ps23 avatar stevemcquaid avatar viniciusfeitosa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-go-ide's Issues

colorscheme

how can I use your colorscheme. I don't find it in the internet.

Tagbar

After installation tag bar is aways empty
added
let g:tagbar_ctags_bin = '/usr/local/bin/ctags' to plugins.vim but still no effect
screen shot 2016-06-19 at 8 37 47 am

Runtime error fresh install ubuntu 16.04

I installed vim after run the install script

vim -u ~/.vimrc.go
Error detected while processing /home/andrew/.vim_go_runtime/vimrc/plugins.vim:
line 2:
E117: Unknown function: pathogen#infect
line 3:
E117: Unknown function: pathogen#infect
line 4:
E117: Unknown function: pathogen#helptags
Press ENTER or type command to continue

What about tags?

Actually it's not an issue report but a suggestion. Your work is very useful, so thanks for this sharing firstly :) But, what about the tag-list? I want to see the functions, packages, variables showing on right or left side, for example, just use tagbar as suggested in vim-go. I wonder why this feature is missed in your work...

Pathogen dependency

I did not have pathogen installed on my machine, and was not able to run vim-go-ide after a fresh install.

After installing Pathogen, it works now. I could specify the dependency to the README if you want.

Error detected while processing function go#def#Jump

To reproduce:

  1. Install the latest vim-go-ide as the instruction
  2. Open an existed go project
  3. type :GoDef

Error raised at bottom of the screen:

Error detected while processing function go#def#Jump[24]..<SNR>109_godefJump:
line   35:
E924: Current window was closed

After press Enter, it jumps to first line of the target tab, I believe the expected behavior is jumping to the function definition in another tab.

Error detected while processing VimEnter

I hit this error:

Error detected while processing VimEnter Auto commands for "*":
E492: Not an editor command:  NERDTree | endif

Not sure what is wrong to speak the truth. I was doing all steps as described.
When I load some .go src file it is visible that some plugins are loaded and working. But some are not.

Also GoInstallBinaries is not among editor commands. Not sure if it helps

vim模式自动切换?

当我输入个{},并把花括号另起一行时{
},按esc键,vim会自动从正常模式切换到插入模式,请问下怎么改成和正常的vim一样,找了好久没找到怎么改

Error when running vim -u ~/.vimrc.go

Here is what I get on new install of vim in Ubuntu 12.04 and cloning this repo
Error detected while processing /home/abdi/.vim_go_runtime/vimrc/plugins.vim:
line 2:
E117: Unknown function: pathogen#infect
line 3:
E117: Unknown function: pathogen#infect
line 4:
E117: Unknown function: pathogen#helptags
Press ENTER or type command to continue

How to disable [Location List]

Hi Victor
vim-go-ide ia really good tool.
I have a question, how can I disable the [Location List] part. eg it always tell [Syntax: line:24(1)].

Screenshot question

In the screenshot, there is a buffer open on the bottom with some test results. I've read through the code but I can't find which plugin/settings produce this. Can you help me out?

[Suggestion] Ale instead of syntastic

Recently we got Vim8 released which featured concurrent plugins execution.
While Syntastic is fantastic - it still slows down vim on large files and especially on large project.

Also, the vim-go and syntastic sometimes does not play very well together.
Given this, maybe it would be a nice idea to swap syntastic by Ale?

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.