Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the supermarket mailing list.

Select Badges

Select Supported Platforms


vim-go (2) Versions 0.1.2

Installs/Configures vim-go

cookbook 'vim-go', '~> 0.1.2'
cookbook 'vim-go', '~> 0.1.2', :supermarket
knife cookbook site install vim-go
knife cookbook site download vim-go

vim-go cookbook

vim-go (0.1.2) Installs/Configures vim-go

Installs vim-go in the .vimrc for each user based on the users data_bag

If node[:vim_go][:user_databag] is set it will install for all the users listed in the databag that have vim: true.

The users data_bag format is expected to be in the format of the fnichol/chef-user or opscode-cookbooks/users cookbooks". Only the "id" and "vim" keys are used by this cookbook.

Right now it also installs the following:

  • git
  • golang
  • vim-nox
  • pathogen.vim
  • vim-go

It also sets up a basic .vimrc suitable for go development

The content for .vimrc is set in node[:vim_go][:vimrc] and the default is:

set nocompatible
set t_Co=16
execute pathogen#infect()
filetype indent plugin on
syntax enable
set number
set mouse=a
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_fmt_command = "goimports"
au FileType go nmap <Leader>s <Plug>(go-implements)
au FileType go nmap <Leader>i <Plug>(go-info)

You can override the attribute node[:vim_go][:vimrc] with alternative content or set it to nil to have the cookbook do nothing with .vimrc.

Will not overwrite:

  • ~/.vim/bundle/vim-go
  • ~/.vim/autoload/pathogen.vim

Only tested with ubuntu 14.04 but probably will work elsewhere.

WARNING: If $GOBIN isn't writable by the user having vim-go installed, the :GoInstallBinaries command will fail and probably screw up the chef-client logging output. Thus `node[:vim_go][:install_go_binariers] is false by default

Make sure GOBIN points to somewhere that your user can write to.



ubuntu >= 14.04


apt >= 0.0.0

git >= 0.0.0

golang >= 0.0.0

vim >= 0.0.0


  calculated: false
  choice: []
  default: users
  description: Name of the users data_bag
  display_name: Users Databag
  type: string
  recipes: []
  required: optional

  calculated: false
  choice: []
  default: true
  description: Install Vim using the vim cookbook
  display_name: Install Vim
  type: boolean
  recipes: []
  required: optional

  calculated: false
  choice: []
  default: false
  description: Install go binaries with vim :GoInstallBinaries
  display_name: Install Go Binaries
  type: boolean
  recipes: []
  required: optional

  calculated: false
  choice: []
  default: See main description
  description: Sets the .vimrc content if there is no existing .vimrc
  display_name: Vimrc
  type: string
  recipes: []
  required: optional


  Does all the work to install vim-go and dependencies

Testing and Utility

<Rake::Task default => [prepare, test]>
  Install required Gems and Cookbook then run all tests

<Rake::Task direnv => []>
  Setup direnv by updating path to have chefdk first and remove any rvm directories from the PATH

<Rake::Task integration => [integration:kitchen]>

<Rake::Task integration:kitchen => []>

<Rake::Task kitchen:all => [default-ubuntu-1404]>
  Run all test instances

<Rake::Task kitchen:default-ubuntu-1404 => []>
  Run default-ubuntu-1404 test instance

<Rake::Task prepare => [prepare:bundle, prepare:berks]>
  Install required Gems and Cookbooks

<Rake::Task prepare:berks => []>

<Rake::Task prepare:bundle => []>

<Rake::Task readme => []>
  Generate the file.

<Rake::Task spec => [unit]>

<Rake::Task style => [style:foodcritic, style:rubocop]>
  Run all style checks

<Rake::Task style:foodcritic => []>

<Rake::Task style:rubocop => []>

<Rake::Task test => [style, unit, integration]>
  Run all tests

<Rake::Task unit => [unit:chefspec]>
  Run all unit tests

<Rake::Task unit:chefspec => []>

<Rake::Task yard => []>
  Generate YARD Documentation

License and Authors

The following engineers have contributed to this code: * Robert J. Berger - 16 commits

Copyright:: 2015, Mist Systems, LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


We welcome contributed improvements and bug fixes via the usual workflow:

  1. Fork this repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new pull request

Dependent cookbooks

vim >= 0.0.0
golang >= 0.0.0
git >= 0.0.0
apt >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.


This file is used to list changes made in each version of the vim-go cookbook.


  • rberger - Initial release of vim-go


  • rberger - Moved to using cookbooks instead of packages for git and vim. Added attribute to disalbe installing vim


  • rberger - Added more attributes to control what is installed. In particular, the .vimrc content is now an attribute and :GoInstallBinaries is only run if the attribute is set and its off by default since it depends on how GOBIN is set.

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Foodcritic Metric

0.1.2 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/attributes/default.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/attributes/default.rb:21
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/attributes/default.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/attributes/default.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/recipes/default.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/recipes/default.rb:69
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/recipes/default.rb:81
FC003: Check whether you are running with chef server before using server-specific features: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/recipes/default.rb:30
FC019: Access node attributes in a consistent manner: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/recipes/default.rb:26
FC019: Access node attributes in a consistent manner: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/recipes/default.rb:27
FC031: Cookbook without metadata file: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/a9ca2e951520b2bc00e1018b/vim-go/metadata.rb:1