Skip to content

Instantly share code, notes, and snippets.

View cridenour's full-sized avatar

Chris Ridenour cridenour

View GitHub Profile

Keybase proof

I hereby claim:

  • I am cridenour on github.
  • I am cridenour ( on keybase.
  • I have a public key ASAQTNEcfAD12o3nS1-anBPFt_c9pN05EAnjRMfA4zfeBgo

To claim this, I am signing this object:

cridenour / gist:74e7635275331d5afa6b
Last active August 7, 2023 13:52
Setting up Vim as your Go IDE

Setting up Vim as your Go IDE

The final IDE


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.

cridenour / index.html
Created May 22, 2013 06:19
Created from - kept here for use later! The two columns turn into a single column for email clients that recognize media queries. For others they'll use the percentage widths or will show the regular 600px wide format. This framework has tested successfully in Gmail, Yahoo, Mac and PC Outlook, and works resp…
<body style="width:100%; margin:0; padding:0; -webkit-text-size-adjust:none; -ms-text-size-adjust:none; background-color:#ffffff;">
<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" style="height:auto !important; margin:0; padding:0; width:100% !important; background-color:#FFFFFF; color:#222222;">
<div id="tablewrap" style="width:100% !important; max-width:600px !important; text-align:center; margin:0 auto;">
<table id="contenttable" width="600" align="center" cellpadding="0" cellspacing="0" border="0" style="background-color:#FFFFFF; margin:0 auto; text-align:center; border:none; width: 100% !important; max-width:600px !important;">
<td width="100%">
<table bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="0" width="100%">
cridenour /
Created September 13, 2012 21:50
Polymorphic Django Models
from django.db import models
from django.db.models.base import ModelBase
from django.db.models.query import QuerySet
from django.contrib.contenttypes.models import ContentType
class PolymorphicMetaclass(ModelBase):
def __new__(cls, name, bases, dct):
def save(self, *args, **kwargs):
if(not self.content_type):
self.content_type = ContentType.objects.get_for_model(self.__class__)
from django.db import models
class Moment(models.Model):
title = models.CharFiend(max_length=128)
image = models.ImageField(upload_to='moments')
description = models.TextField()
uploaded = models.DateTimeField(auto_now_add=True, blank=True)
def __unicode__(self):
return self.title