e31391abee4c

Merge.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 27 Oct 2010 09:25:52 -0400
parents f71dcc350ee4 (diff) a897edaa3e97 (current diff)
children 3bfc11be905d
branches/tags (none)
files vim/.vimrc

Changes

--- a/.hgrc	Wed Oct 27 08:38:15 2010 -0400
+++ b/.hgrc	Wed Oct 27 09:25:52 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	Wed Oct 27 08:38:15 2010 -0400
+++ b/vim/.vimrc	Wed Oct 27 09:25:52 2010 -0400
@@ -219,6 +219,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>
@@ -271,9 +272,160 @@
 noremap <leader>roi :RopeOrganizeImports<CR>
 
 " Gundo
-nnoremap U :GundoToggle<cr>
+nnoremap U :GundoToggle<CR>
 let g:gundo_debug = 1
 
+" 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
     colorscheme molokai
--- a/vim/snippets/django.snippets	Wed Oct 27 08:38:15 2010 -0400
+++ b/vim/snippets/django.snippets	Wed Oct 27 09:25:52 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	Wed Oct 27 08:38:15 2010 -0400
+++ b/vim/snippets/python.snippets	Wed Oct 27 09:25:52 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 .