--- a/.hgrc Tue Oct 19 17:08:12 2010 -0400
+++ b/.hgrc Wed Oct 27 09:22:56 2010 -0400
@@ -179,3 +179,4 @@
# Easily add ignore patterns.
ignore = ![ -n "$@" ] && echo '$@' >> `$HG root`/.hgignore && \
$HG commit `$HG root`/.hgignore -Am 'Add "$@" to .hgignore.'
+
--- a/vim/.vimrc Tue Oct 19 17:08:12 2010 -0400
+++ b/vim/.vimrc Wed Oct 27 09:22:56 2010 -0400
@@ -222,6 +222,7 @@
nnoremap _dt :set ft=htmldjango<CR>
nnoremap _jt :set ft=htmljinja<CR>
nnoremap _cw :set ft=confluencewiki<CR>
+nnoremap _pd :set ft=python.django<CR>
"
" HALP
nnoremap _wtfcw :!open 'http://confluence.atlassian.com/renderer/notationhelp.action?section=all'<cr>
@@ -274,7 +275,158 @@
noremap <leader>roi :RopeOrganizeImports<CR>
" Gundo
-nnoremap <F5> :GundoToggle<CR>
+nnoremap U :GundoToggle<CR>
+
+" Next
+nnoremap cinb f(ci(
+nnoremap canb f(ca(
+nnoremap cinB f{ci{
+nnoremap canB f{ca{
+nnoremap cin( f(ci(
+nnoremap can( f(ca(
+nnoremap cin{ f{ci{
+nnoremap can{ f{ca{
+nnoremap cin) f(ci(
+nnoremap can) f(ca(
+nnoremap cin} f{ci{
+nnoremap can} f{ca{
+nnoremap cin[ f[ci[
+nnoremap can[ f[ca[
+nnoremap cin] f[ci[
+nnoremap can] f[ca[
+nnoremap cin< f<ci<
+nnoremap can< f<ca<
+nnoremap cin> f<ci<
+nnoremap can> f<ca<
+nnoremap cin' f'ci'
+nnoremap can' f'ca'
+nnoremap cin" f"ci"
+nnoremap can" f"ca"
+
+nnoremap dinb f(di(
+nnoremap danb f(da(
+nnoremap dinB f{di{
+nnoremap danB f{da{
+nnoremap din( f(di(
+nnoremap dan( f(da(
+nnoremap din{ f{di{
+nnoremap dan{ f{da{
+nnoremap din) f(di(
+nnoremap dan) f(da(
+nnoremap din} f{di{
+nnoremap dan} f{da{
+nnoremap din[ f[di[
+nnoremap dan[ f[da[
+nnoremap din] f[di[
+nnoremap dan] f[da[
+nnoremap din< f<di<
+nnoremap dan< f<da<
+nnoremap din> f<di<
+nnoremap dan> f<da<
+nnoremap din' f'di'
+nnoremap dan' f'da'
+nnoremap din" f"di"
+nnoremap dan" f"da"
+
+nnoremap yinb f(yi(
+nnoremap yanb f(ya(
+nnoremap yinB f{yi{
+nnoremap yanB f{ya{
+nnoremap yin( f(yi(
+nnoremap yan( f(ya(
+nnoremap yin{ f{yi{
+nnoremap yan{ f{ya{
+nnoremap yin) f(yi(
+nnoremap yan) f(ya(
+nnoremap yin} f{yi{
+nnoremap yan} f{ya{
+nnoremap yin[ f[yi[
+nnoremap yan[ f[ya[
+nnoremap yin] f[yi[
+nnoremap yan] f[ya[
+nnoremap yin< f<yi<
+nnoremap yan< f<ya<
+nnoremap yin> f<yi<
+nnoremap yan> f<ya<
+nnoremap yin' f'yi'
+nnoremap yan' f'ya'
+nnoremap yin" f"yi"
+nnoremap yan" f"ya"
+
+nnoremap ciNb F(ci(
+nnoremap caNb F(ca(
+nnoremap ciNB F{ci{
+nnoremap caNB F{ca{
+nnoremap ciN( F(ci(
+nnoremap caN( F(ca(
+nnoremap ciN{ F{ci{
+nnoremap caN{ F{ca{
+nnoremap ciN) F(ci(
+nnoremap caN) F(ca(
+nnoremap ciN} F{ci{
+nnoremap caN} F{ca{
+nnoremap ciN[ F[ci[
+nnoremap caN[ F[ca[
+nnoremap ciN] F[ci[
+nnoremap caN] F[ca[
+nnoremap ciN< F<ci<
+nnoremap caN< F<ca<
+nnoremap ciN> F<ci<
+nnoremap caN> F<ca<
+nnoremap ciN' F'ci'
+nnoremap caN' F'ca'
+nnoremap ciN" F"ci"
+nnoremap caN" F"ca"
+
+nnoremap diNb F(di(
+nnoremap daNb F(da(
+nnoremap diNB F{di{
+nnoremap daNB F{da{
+nnoremap diN( F(di(
+nnoremap daN( F(da(
+nnoremap diN{ F{di{
+nnoremap daN{ F{da{
+nnoremap diN) F(di(
+nnoremap daN) F(da(
+nnoremap diN} F{di{
+nnoremap daN} F{da{
+nnoremap diN[ F[di[
+nnoremap daN[ F[da[
+nnoremap diN] F[di[
+nnoremap daN] F[da[
+nnoremap diN< F<di<
+nnoremap daN< F<da<
+nnoremap diN> F<di<
+nnoremap daN> F<da<
+nnoremap diN' F'di'
+nnoremap daN' F'da'
+nnoremap diN" F"di"
+nnoremap daN" F"da"
+
+nnoremap yiNb F(yi(
+nnoremap yaNb F(ya(
+nnoremap yiNB F{yi{
+nnoremap yaNB F{ya{
+nnoremap yiN( F(yi(
+nnoremap yaN( F(ya(
+nnoremap yiN{ F{yi{
+nnoremap yaN{ F{ya{
+nnoremap yiN) F(yi(
+nnoremap yaN) F(ya(
+nnoremap yiN} F{yi{
+nnoremap yaN} F{ya{
+nnoremap yiN[ F[yi[
+nnoremap yaN[ F[ya[
+nnoremap yiN] F[yi[
+nnoremap yaN] F[ya[
+nnoremap yiN< F<yi<
+nnoremap yaN< F<ya<
+nnoremap yiN> F<yi<
+nnoremap yaN> F<ya<
+nnoremap yiN' F'yi'
+nnoremap yaN' F'ya'
+nnoremap yiN" F"yi"
+nnoremap yaN" F"ya"
if has('gui_running')
set guifont=Menlo:h12
--- a/vim/snippets/django.snippets Tue Oct 19 17:08:12 2010 -0400
+++ b/vim/snippets/django.snippets Wed Oct 27 09:22:56 2010 -0400
@@ -73,19 +73,24 @@
class ${1:ModelName}(models.Model):
"""${2:docstring}"""
${3}
-
+
+ created = models.DateTimeField(auto_now_add=True, editable=False)
+ modified = models.DateTimeField(auto_now=True, editable=False)
+
class Meta:
+ ordering = ['-created']
${4}
def __unicode__(self):
- ${5}
+ return u'%s' % self.${5}
- def save(self, force_insert=False, force_update=False):
+ def save(self, *args, **kwargs):
${6}
+ return super($1, self).save(*args, **kwargs)
@models.permalink
def get_absolute_url(self):
- return ('${7:view_or_url_name}' ${8})
+ return ('${7:view_or_url_name}', (), {})
snippet modeladmin
class ${1:ModelName}Admin(admin.ModelAdmin):
--- a/vim/snippets/python.snippets Tue Oct 19 17:08:12 2010 -0400
+++ b/vim/snippets/python.snippets Wed Oct 27 09:22:56 2010 -0400
@@ -22,6 +22,10 @@
snippet defs
def ${1:method}(self${2}):
${3:pass}
+snippet prop
+ @property
+ def ${1:method}(self${2}):
+ ${3:pass}
snippet lam
lambda ${1:args}: ${2:action}
snippet .