From 617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 11 Nov 2014 02:37:21 +0100 Subject: Update --- indent/blade.vim | 12 ----------- indent/coffee.vim | 2 +- indent/elixir.vim | 3 ++- indent/haskell.vim | 10 ++++----- indent/html.vim | 3 ++- indent/rust.vim | 60 ++++++++++++++++++++++++++++-------------------------- indent/tex.vim | 31 ++++++++++++++++++++++++++++ 7 files changed, 72 insertions(+), 49 deletions(-) delete mode 100644 indent/blade.vim (limited to 'indent') diff --git a/indent/blade.vim b/indent/blade.vim deleted file mode 100644 index 73550fb7..00000000 --- a/indent/blade.vim +++ /dev/null @@ -1,12 +0,0 @@ -" Language: Blade (Laravel) -" Maintainer: xsbeats -" URL: http://github.com/xsbeats/vim-blade -" License: WTFPL - -if exists("b:did_indent") - finish -endif - -runtime! indent/html.vim - -let b:did_indent = 1 diff --git a/indent/coffee.vim b/indent/coffee.vim index 7bd82e3e..4f4570a8 100644 --- a/indent/coffee.vim +++ b/indent/coffee.vim @@ -1,5 +1,5 @@ " Language: CoffeeScript -" Maintainer: Mick Koch +" Maintainer: Mick Koch " URL: http://github.com/kchmck/vim-coffee-script " License: WTFPL diff --git a/indent/elixir.vim b/indent/elixir.vim index fababe48..3563f44a 100644 --- a/indent/elixir.vim +++ b/indent/elixir.vim @@ -11,7 +11,8 @@ let b:did_indent = 1 setlocal nosmartindent setlocal indentexpr=GetElixirIndent() -setlocal indentkeys+==end,=else:,=match:,=elsif:,=catch:,=after:,=rescue: +setlocal indentkeys+=0=end,0=else,0=match,0=elsif,0=catch,0=after,0=rescue +setlocal indentkeys+==-> if exists("*GetElixirIndent") finish diff --git a/indent/haskell.vim b/indent/haskell.vim index 1d741032..1d500250 100644 --- a/indent/haskell.vim +++ b/indent/haskell.vim @@ -55,7 +55,7 @@ function! HIndent(lnum) " This is the wrong thing if you are deeply indented already and want to put " a where clause on the top-level construct, but there isn't much that can " be done about that case... - if thisl =~ '^\s*where\s*$' + if thisl =~ '^\s*where\s*' return previ + &sw endif @@ -175,11 +175,11 @@ function! HIndent(lnum) return previ - &sw endif - " On the other hand, if the previous line is a where with some bindings + " On the other hand, if the previous line is a do or where with some bindings " following it on the same line, accommodate and align with the first non-ws " char after the where - if prevl =~ '\Wwhere\s\+\w' - let bindStart = match(prevl, '\(\Wwhere\s\+\)\@<=\w') + if prevl =~ '\W\(do\|where\)\s\+\w' + let bindStart = match(prevl, '\(\W\(do\|where\)\s\+\)\@<=\w') if bindStart != -1 return bindStart endif @@ -248,7 +248,7 @@ function! s:GetAndStripTrailingComments(lnum) let aline = getline(a:lnum) " We can't just remove the string literal since that leaves us with a " trailing operator (=), so replace it with a fake identifier - let noStrings = substitute(aline, '"\([^"]\|\\"\)*"', 's', '') + let noStrings = substitute(aline, '"\([^"]\|\\"\)*"', '\=repeat("s", len(submatch(0)))', '') let noLineCom = substitute(noStrings, '--.*$', '', '') " If there are no fancy block comments involved, skip some of this extra diff --git a/indent/html.vim b/indent/html.vim index cbd324bc..769f6318 100644 --- a/indent/html.vim +++ b/indent/html.vim @@ -187,6 +187,7 @@ if exists('g:html_exclude_tags') endfor endif let s:html_indent_tags = join(s:tags, '\|') +let s:html_indent_tags = s:html_indent_tags.'\|\w\+\(-\w\+\)\+' if exists('g:html_indent_tags') let s:html_indent_tags = s:html_indent_tags.'\|'.g:html_indent_tags endif @@ -281,7 +282,7 @@ fun! HtmlIndentGet(lnum) if 0 < searchpair(js, '', jse, 'nWb') \ && 0 < searchpair(js, '', jse, 'nW') " we're inside javascript - if getline(searchpair(js, '', '', 'nWb')) !~ '', 'nWb')) !~ '