From d3286cc6d5dbc75b0b02e926998d43de3477ee86 Mon Sep 17 00:00:00 2001 From: Ben O'Hara Date: Sun, 10 Nov 2013 19:07:08 +1000 Subject: [PATCH] Setup git-gutter --- ftdetect/eyaml.vim | 10 ++++++++++ ftplugin/htmldjango.vim | 10 ++++++++++ ftplugin/yaml.vim | 32 -------------------------------- plugin/settings/git-gutter.vim | 12 ++++++++++++ vundles.vim | 1 + 5 files changed, 33 insertions(+), 32 deletions(-) delete mode 100644 ftplugin/yaml.vim create mode 100644 plugin/settings/git-gutter.vim diff --git a/ftdetect/eyaml.vim b/ftdetect/eyaml.vim index 2b281fb..63d878b 100644 --- a/ftdetect/eyaml.vim +++ b/ftdetect/eyaml.vim @@ -1 +1,11 @@ +" +" dotvim : https://github.com/dotphiles/dotvim +" +" setup eyaml to use yaml syntax highlighting +" +" Authors: +" Ben O'Hara +" + au BufNewFile,BufRead *.eyaml setlocal ft=yaml + diff --git a/ftplugin/htmldjango.vim b/ftplugin/htmldjango.vim index 4a434e0..910c0f5 100644 --- a/ftplugin/htmldjango.vim +++ b/ftplugin/htmldjango.vim @@ -1,3 +1,12 @@ +" +" dotvim : https://github.com/dotphiles/dotvim +" +" Setup htmldjango +" +" Authors: +" Ben O'Hara +" + let b:surround_{char2nr("v")} = "{{ \r }}" let b:surround_{char2nr("{")} = "{{ \r }}" let b:surround_{char2nr("%")} = "{% \r %}" @@ -6,3 +15,4 @@ let b:surround_{char2nr("i")} = "{% if \1condition: \1 %}\r{% endif %}" let b:surround_{char2nr("w")} = "{% with \1with: \1 %}\r{% endwith %}" let b:surround_{char2nr("f")} = "{% for \1for loop: \1 %}\r{% endfor %}" let b:surround_{char2nr("c")} = "{% comment %}\r{% endcomment %}" + diff --git a/ftplugin/yaml.vim b/ftplugin/yaml.vim deleted file mode 100644 index 1b1ded3..0000000 --- a/ftplugin/yaml.vim +++ /dev/null @@ -1,32 +0,0 @@ -" Vim indent file -" Language: Yaml -" Author: Ian Young -" Get it bundled for pathogen: https://github.com/avakhov/vim-yaml - -if exists("b:did_indent") - finish -endif -"runtime! indent/ruby.vim -"unlet! b:did_indent -let b:did_indent = 1 - -setlocal autoindent sw=2 et -setlocal indentexpr=GetYamlIndent() -setlocal indentkeys=o,O,*,!^F - -function! GetYamlIndent() - let lnum = v:lnum - 1 - if lnum == 0 - return 0 - endif - let line = substitute(getline(lnum),'\s\+$','','') - let indent = indent(lnum) - let increase = indent + &sw - if line =~ ':$' - return increase - else - return indent - endif -endfunction - -" vim:set sw=2: diff --git a/plugin/settings/git-gutter.vim b/plugin/settings/git-gutter.vim new file mode 100644 index 0000000..671fe26 --- /dev/null +++ b/plugin/settings/git-gutter.vim @@ -0,0 +1,12 @@ +" +" dotvim : https://github.com/dotphiles/dotvim +" +" Setup git-gutter +" +" Authors: +" Ben O'Hara +" + +nmap :GitGutterToggle +nmap :GitGutterLineHighlightsToggle + diff --git a/vundles.vim b/vundles.vim index 448d1da..9878213 100644 --- a/vundles.vim +++ b/vundles.vim @@ -35,6 +35,7 @@ if count(g:vundles, 'general') Bundle 'mbbill/undotree' if executable('git') Bundle 'tpope/vim-fugitive' + Bundle 'airblade/vim-gitgutter' endif if executable('hg') Bundle 'k-takata/hg-vim'