Skip to content

Instantly share code, notes, and snippets.

@cridenour
cridenour / gist:74e7635275331d5afa6b
Last active June 17, 2025 16:47
Setting up Vim as your Go IDE

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

@marekkalnik
marekkalnik / SpinningContext.php
Created July 9, 2014 14:47
Using spinners in BehatContext
<?php
use Behat\MinkExtension\Context\MinkContext;
class BaseFeatureContext extends MinkContext
{
/**
* This function prevents Behat form failing a tests if the HTML is not loaded yet.
* Behat with Selenium often executes tests faster thant Selenium is able to retreive
* the HTML causing false negatives.
@Morasta
Morasta / d7_display_suite_hide_labels_function.php
Last active September 2, 2016 02:10
Drupal 7 - Hide labels for empty display suite fields
/**
* Implements hook_field_attach_view_alter().
*
* Hide label of display suite fields if field content is empty.
*/
function cof_directory_field_attach_view_alter(&$output, $context) {
$displaySuiteFields = array("graduate_students","office_location");
foreach ($output as $field_name => $field) {
if (!empty($field['#label_display'])) {
@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# [email protected]
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)