Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mattly/dotfiles
base: 4da5c69cc3
...
head fork: mattly/dotfiles
compare: 5a5ecf8066
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 42 additions and 23 deletions.
  1. +2 −2 vim/syntax/django.vim
  2. +34 −0 vim/syntax/htmldjango.vim
  3. +6 −21 vimrc
View
4 vim/syntax/django.vim
@@ -21,7 +21,7 @@ syn match djangoError "%}\|}}\|#}"
syn keyword djangoStatement contained autoescape csrf_token empty
" FIXME ==, !=, <, >, <=, and >= should be djangoStatements:
" syn keyword djangoStatement contained == != < > <= >=
-syn keyword djangoStatement contained and as block endblock by cycle debug else
+syn keyword djangoStatement contained and as block endblock by cycle debug else elif
syn keyword djangoStatement contained extends filter endfilter firstof for
syn keyword djangoStatement contained endfor if endif ifchanged endifchanged
syn keyword djangoStatement contained ifequal endifequal ifnotequal
@@ -45,7 +45,7 @@ syn keyword djangoFilter contained linebreaks linebreaksbr linenumbers ljust
syn keyword djangoFilter contained lower make_list phone2numeric pluralize
syn keyword djangoFilter contained pprint random removetags rjust slice slugify
syn keyword djangoFilter contained safe safeseq stringformat striptags
-syn keyword djangoFilter contained time timesince timeuntil title
+syn keyword djangoFilter contained time timesince timeuntil title truncatechars
syn keyword djangoFilter contained truncatewords truncatewords_html unordered_list upper urlencode
syn keyword djangoFilter contained urlize urlizetrunc wordcount wordwrap yesno
View
34 vim/syntax/htmldjango.vim
@@ -0,0 +1,34 @@
+" Vim syntax file
+" Language: Django HTML template
+" Maintainer: Dave Hodder <dmh@dmh.org.uk>
+" Last Change: 2007 Jan 26
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+if !exists("main_syntax")
+ let main_syntax = 'html'
+endif
+
+if version < 600
+ so <sfile>:p:h/django.vim
+ so <sfile>:p:h/html.vim
+else
+ runtime! syntax/django.vim
+ runtime! syntax/html.vim
+ unlet b:current_syntax
+endif
+
+syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock
+
+syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display containedin=ALLBUT,@djangoBlocks
+syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks
+syn region djangoComment start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
+syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
+
+let b:current_syntax = "htmldjango"
View
27 vimrc
@@ -56,18 +56,21 @@
else
set t_Co=256
set background=light
+ " bar cursor in insert mode, block cursor in normal node
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
else
- " bar cursor in insert mode
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
- " block cursor in normal mode
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif
endif
let colors='tomorrow'
+
+ hi OverLength guifg=#ffffff guibg=#ff0000
+ hi OverLength ctermbg=red ctermfg=white
+
if g:colors == 'solarized'
let g:solarized_contrast="high"
colorscheme solarized
@@ -89,9 +92,6 @@
hi StatusWarning ctermbg=160 ctermfg=254
elseif g:colors == 'tomorrow'
colorscheme Tomorrow
- else
- hi OverLength guifg=#ffffff guibg=#ff0000
- hi OverLength ctermbg=red ctermfg=white
end
" Backups (or lack thereof)
@@ -105,7 +105,7 @@
set ruler " show the cursor position
set showcmd " show incomplete commands
set lazyredraw " speeds up certain macros and such
- set number " show line numbers
+ set nonumber " hide line numbers by default
set wildmenu " wildmenu is awesome
set wildmode=list:longest,full
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*
@@ -348,21 +348,6 @@
endif
endfunction
- " Highlight parts of lines longer than 85 characters
- " autocmd BufNewFile,BufRead * match OverLength /\%86v.\+/
- let longlines=0
- nnoremap <Leader>8 :call LongLines()<CR>
- function! LongLines()
- if g:longlines==0
- match OverLength /\%82v.\+/
- let g:longlines=1
- else
- match OverLength //
- let g:longlines=0
- endif
- endfunction
- call LongLines()
-
" Stoner Coder Bro says:
" whoa, i totally changed this file brah! Like, what happened?
" Now you can help stoner coder bro figure out what he did

No commit comments for this range

Something went wrong with that request. Please try again.