From 322667f1c69cd9c8fc170adc5d10de7d7e47e2cb Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Mon, 5 Aug 2013 09:27:54 -0300 Subject: [PATCH] latest changes --- configs/gvimrc | 6 ++++-- configs/vimrc | 20 ++++++++++++-------- snippets/htmldjango.snippets | 18 ++++++++++++++---- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/configs/gvimrc b/configs/gvimrc index f0415ed..8797f21 100644 --- a/configs/gvimrc +++ b/configs/gvimrc @@ -8,8 +8,10 @@ if has('mac') set gfn=monofur:h15 " My screen size sucks, mkay? set lines=63 " number of lines, based on my screen size and font else - set gfn=monofur\ 12 - set lines=48 + set gfn=monofur\ for\ Powerline\ 12 + " set gfn=Source\ Code\ Pro\ for\ Powerline\ Medium\ 11 + set lines=54 + let g:Powerline_symbols = 'fancy' endif color Mustang diff --git a/configs/vimrc b/configs/vimrc index 01ee30a..aff5264 100644 --- a/configs/vimrc +++ b/configs/vimrc @@ -85,9 +85,9 @@ au FileType python set expandtab tabstop=4 shiftwidth=4 softtabstop=4 textwidth= " reStructured files follow python closely, but use 3 tab stops instead of 4 au FileType rst set expandtab tabstop=3 sw=3 sts=3 textwidth=78 -" templates (Jinja2 in this case) will also have spaces instead of tabs and -" follow most of the python standards (with the exception of the textwidth) -au FileType htmldjango set expandtab tabstop=4 shiftwidth=4 softtabstop=4 +" templates (Jinja2 in this case) will use tabs instead (to reduce file size) +" but also 2 spaces for tabs. +au FileType htmldjango set noet tabstop=4 shiftwidth=4 softtabstop=4 " the smarty filetypes doesn't have any sort of indentation, so we set it to " auto @@ -167,20 +167,18 @@ let php_smart_members=1 set rtp+=~/.vim/bundle/vundle/ call vundle#rc() -Bundle 'Lokaltog/vim-powerline' +Bundle "Lokaltog/powerline" Bundle 'tpope/vim-fugitive' Bundle 'tpope/vim-commentary' Bundle 'godlygeek/tabular' Bundle 'jiangmiao/auto-pairs' Bundle 'nvie/vim-flake8' -" Bundle 'scrooloose/nerdtree' -" Bundle 'terryma/vim-multiple-cursors' Bundle 'msanders/snipmate.vim' Bundle 'kien/ctrlp.vim' -" Bundle 'Glench/Vim-Jinja2-Syntax' +Bundle 'terryma/vim-multiple-cursors' " powerline settings -""let g:Powerline_symbols = 'fancy' +let g:Powerline_symbols = 'fancy' " auto-pair settings let g:AutoPairsMapCR = 1 @@ -233,3 +231,9 @@ function PowerTabLine() endfunction set tabline=%!PowerTabLine() + +" powerline +python from powerline.vim import setup as powerline_setup +python powerline_setup() +python del powerline_setup + diff --git a/snippets/htmldjango.snippets b/snippets/htmldjango.snippets index 6773847..5e837d0 100644 --- a/snippets/htmldjango.snippets +++ b/snippets/htmldjango.snippets @@ -1,20 +1,30 @@ snippet for {% for ${1:record} in ${2:list} %} - ${3:{# content #}} + ${3:{% content %}} {% endfor %} snippet if {% if ${1:condition} %} - ${2:{# content #}} + ${2:{% content %}} {% endif %} +snippet else + {% else %} snippet block {% block ${1:blockname} %} - ${2:{# content #}} + ${2:{% content %}} {% endblock $1 %} snippet macro {% macro ${1:name}(${2:params}) %} - ${3:{# content #}} + ${3:{% content %}} {% endmacro %} {# $1 #} snippet import {% import "${1:filename}" as ${2:namespace}${3: with context} %} snippet modeline {# vim:set ft=htmldjango: #} +snippet include + {% include "${1:filename}"${2: ignore missing}${3: with context} %} +snippet set + {% set ${1:variable} = ${2:value} %} +snippet call + {% call ${1:macro}(${2:params}) %} + ${3:{% content %}} + {% endcall %} {# $1 #}