All Projects → xlucas → go-vim-install

xlucas / go-vim-install

Licence: other
Easy environment setup for Vim addicts and go developers

Programming Languages

Vim Script
2826 projects
shell
77523 projects

Projects that are alternatives of or similar to go-vim-install

name-assign.vim
Vim plugin to automate replacing expressions with assigned variables in any programming language
Stars: ✭ 45 (-33.82%)
Mutual labels:  vim-plugins
vim-build-tools-wrapper
Projects building plugin for Vim
Stars: ✭ 23 (-66.18%)
Mutual labels:  vim-plugins
neomake-multiprocess
A vim plugin for running multiple process asynchronously base on neomake.
Stars: ✭ 36 (-47.06%)
Mutual labels:  vim-plugins
swifty-vim
⌨️ A Vim plugin for Swift which provides file detection, syntax highlighting, support for compiling and running tests, and optional support for formatting and linting tools.
Stars: ✭ 18 (-73.53%)
Mutual labels:  vim-plugins
vim-SystemVerilog
SystemVerilog syntax highlight/indent support in vim
Stars: ✭ 37 (-45.59%)
Mutual labels:  vim-plugins
alternate-lite
a.vim rewriting
Stars: ✭ 21 (-69.12%)
Mutual labels:  vim-plugins
vimapt
A package manager for vim (VimApt => Vim's Advanced Package Tools)
Stars: ✭ 16 (-76.47%)
Mutual labels:  vim-plugins
vim-mix
Vim plugin for using Elixir's build tool, mix
Stars: ✭ 63 (-7.35%)
Mutual labels:  vim-plugins
filestyle
filestyle is a Vim plugin that highlights unwanted whitespace and characters.
Stars: ✭ 30 (-55.88%)
Mutual labels:  vim-plugins
vim-find-files
🔎 Search for files and show results in a quickfix list, new buffer, or populate the argument list.
Stars: ✭ 25 (-63.24%)
Mutual labels:  vim-plugins
vim-UT
Unit Testing plugin for Vim
Stars: ✭ 18 (-73.53%)
Mutual labels:  vim-plugins
gotests-vim
Vim plugin for https://github.com/cweill/gotests
Stars: ✭ 129 (+89.71%)
Mutual labels:  vim-plugins
vim-hdl
Vim plugin to aid VHDL development (for LSP, see https://github.com/suoto/hdl_checker)
Stars: ✭ 59 (-13.24%)
Mutual labels:  vim-plugins
vim-jsonc
⚠️Deprecated⚠️: Vim syntax highlighting plugin for JSON with C-style line (//) and block (/* */) comments.
Stars: ✭ 52 (-23.53%)
Mutual labels:  vim-plugins
vim-gitbranch
Provides the branch name of the current git repository
Stars: ✭ 171 (+151.47%)
Mutual labels:  vim-plugins
vim-debugstring
Debug printf()-style at the speed of light
Stars: ✭ 30 (-55.88%)
Mutual labels:  vim-plugins
nv-ide
Neovim custom configuration, oriented for full stack developers (rails, ruby, php, html, css, SCSS, javascript)
Stars: ✭ 363 (+433.82%)
Mutual labels:  vim-plugins
vim-mypy
Vim plugin for executing Python's optional static type checker MyPy (http://mypy-lang.org/)
Stars: ✭ 89 (+30.88%)
Mutual labels:  vim-plugins
quicktex
A vim plugin for writing Latex quickly.
Stars: ✭ 110 (+61.76%)
Mutual labels:  vim-plugins
dotfiles
NeoVim + git + zsh + tmux bliss
Stars: ✭ 19 (-72.06%)
Mutual labels:  vim-plugins

go-vim-install

Build Status

Easy environment setup for Vim addicts and go developers on Ubuntu.

Install

Hereinafter are two easy ways to get your vim environment ready for go development.

Standard
wget https://raw.githubusercontent.com/xlucas/go-vim-install/master/install.sh
chmod +x install.sh
Vagrant

If you want to boot up a clean Ubuntu VM with a GUI and all the features ready to be used, you can use this gist.

Usage

While there are a lot of great plugins of all kinds for Vim made by amazing people, that's always a hassle to retrieve them all, configure your .vimrc, install colorschemes and extra stuff to get everything eventually working. This little installer for ubuntu make the life simpler for go development with Vim, by providing a command line with 3 options to either :

  • Download and install go from a remote tarball containing the go version of your choice (option -go).
  • Setup a fully working Vim environment with amazing plugins, third party helpers and colorschemes (option -vim).
  • Setup your go workspace with required go tools for Vim plugins (option -work).

Examples :

  • ./install.sh -go https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
  • ./install.sh -vim
  • ./install.sh -work ~/Workspace/go

Be aware to run . ~/.profile after a step is done so environment variables are up to date.

That's all !

Vim environment

The script will install pathogen and the following plugins :

The colorscheme bundled is a variant of molokai.

Here's a screenshot of what the environment will look like :

go-vim-install

The script will install the Monaco font. Set it with a size between 11 and 12 in your terminal configuration.

Workspace setup

The script will install these packages in your workspace :

Most of them are required to have the go-vim plugin fully working. Then you can run crazy things from Vim, like test units with (:GoTest), coverage report with (:GoCoverage), refactor an element name and its references (:GoRename), do code inspection and error checking (:GoDoc, :GoInfo, :GoCallers, :GoCallees, :GoErrCheck ...), build your packages (:GoBuild), detect unchecked errors (:GoErrCheck) and much more. Obviously, you can also remap all these actions to shortcuts of your choice in your .vimrc ! Check the go-vim plugin documentation to get a full list of Go-specific features.

If you don't know what other plugins are doing, you will find some other tasty functionnalities in related documentations !

Shortcuts

The following default shortcuts are set in the .vimrc file :

General

  • F2 : Create a new tab
  • F3 : Maximize/restore current window
  • F4 : Enable search highlight
  • F5 : Disable search highlight
  • F6 : Show/hide the file tree
  • F7 : Show/hide the undo tree
  • F8 : Show/hide the tagbar (shown by default)
  • F9 : Close the current tab
  • CTRL + Up : Go to the next tab
  • CTRL + Down : Go to the previous tab

Formatting

  • F10 : Align text using ',' as a delimiter
  • F12 : Align text using space as a delimiter
  • CTRL + C + , : Format Zen Coding
  • CTRL + _ : Autoclose xml/html tag(s) (repeat to close several ones)
  • CTRL + j : Expand snippet
  • CTRL + n : Go to next snippet item
  • CTRL + p : Go to previous snippet item

Search and replace

  • CTRL + p : Search for a file
  • leader + a : Search for a word recursively from project's root directory
  • leader + aa : Search word under cursor recursively from project's root directory
  • leader + leader + s : Replace all occurences of word under the cursor in this file
  • leader + vr : Recursively replace occurences of word under the cursor in all files

Grammar

  • leader + g : Run a grammar check
  • ! : Go to next grammar error
  • § : Go to previous grammar error
  • leader + ga : Fix all grammar errors automatically
  • leader + gf : Fix this grammar error
  • leader + gr : Remove this grammar error
  • leader + gd : Disable this grammar rule

Git

  • ]h : Go to next hunk
  • [h : Go to previous hunk
  • leader + hp : Preview current git hunk
  • leader + hr : Revert current git hunk
  • leader + hs : Stage current git hunk

Go code

  • , : Jump to next warning/error
  • ? : Jump to previous warning/error
  • gi : Go install
  • leader + b : Go build
  • leader + c : Go coverage
  • leader + l : Go lint
  • leader + i : Show type info of word under cursor
  • leader + e : Rename word under cursor
  • leader + f : Implement an interface
  • leader + ff : Show interface implementing the type under the cursor
  • leader + p : Share selection in the go playground
  • leader + q : Import package (type package name)
  • leader + r : Go run (normal mode) / Add tags to a selected struct (visual mode)
  • leader + s : Go install
  • leader + t : Go test
  • leader + v : Go vet
  • leader + ds : Open declaration of word under cursor in new split window
  • leader + dv : Open declaration of word under cursor in new vertical window
  • leader + dt : Open declaration of word under cursor in new tab
  • leader + gs : Open godoc of word under cursor in new split window
  • leader + gv : Open godoc of word under cursor in new vertical window
  • leader + gb : Open godoc of word under cursor in browser
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].