diff options
author | René Neumann <rene.neumann@in.tum.de> | 2012-09-04 16:20:28 +0200 |
---|---|---|
committer | René Neumann <rene.neumann@in.tum.de> | 2012-09-04 16:20:29 +0200 |
commit | 9d8238cef09d8cb7c270b616ec56a335e0ac0854 (patch) | |
tree | a7857c65ec06a48dd575d604539d331a90c01463 /.vim/indent | |
parent | 08ae3f83268783edd51dd97a749c088007f7fea4 (diff) | |
download | dotfiles-9d8238cef09d8cb7c270b616ec56a335e0ac0854.tar.gz dotfiles-9d8238cef09d8cb7c270b616ec56a335e0ac0854.tar.bz2 dotfiles-9d8238cef09d8cb7c270b616ec56a335e0ac0854.zip |
Move to bundles in vim -- also remove old craft
Diffstat (limited to '')
-rw-r--r-- | .vim/indent/haskell.vim | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/.vim/indent/haskell.vim b/.vim/indent/haskell.vim deleted file mode 100644 index dc7c649..0000000 --- a/.vim/indent/haskell.vim +++ /dev/null @@ -1,85 +0,0 @@ -" Vim indent file -" Language: Haskell -" Author: motemen <motemen@gmail.com> -" Version: 0.1 -" Last Change: 2007-07-25 -" -" Modify g:haskell_indent_if and g:haskell_indent_case to -" change indentation for `if'(default 3) and `case'(default 5). -" Example (in .vimrc): -" > let g:haskell_indent_if = 2 - -if exists('b:did_indent') - finish -endif - -let b:did_indent = 1 - -if !exists('g:haskell_indent_if') - " if bool - " >>>then ... - " >>>else ... - let g:haskell_indent_if = 3 -endif - -if !exists('g:haskell_indent_case') - " case xs of - " >>>>>[] -> ... - " >>>>>(y:ys) -> ... - let g:haskell_indent_case = 5 -endif - -setlocal indentexpr=GetHaskellIndent() -setlocal indentkeys=!^F,o,O - -function! GetHaskellIndent() - let line = substitute(getline(getpos('.')[1] - 1), '\t', repeat(' ', &tabstop), 'g') - - if line =~ '[!#$%&*+./<=>?@\\^|~-]$\|\<do$' - return match(line, '\s*where \zs\|\S') + &shiftwidth - endif - - if line =~ '{$' - return match(line, '\s*where \zs\|\S') + &shiftwidth - endif - - if line =~ '^\(instance\|class\).*\&.*where$' - return &shiftwidth - endif - - if line =~ ')$' - let pos = getpos('.') - normal k$ - let paren_end = getpos('.') - normal % - let paren_begin = getpos('.') - call setpos('.', pos) - if paren_begin[1] != paren_end[1] - return paren_begin[2] - 1 - endif - endif - - if line !~ '\<else\>' - let s = match(line, '\<if\>.*\&.*\zs\<then\>') - if s > 0 - return s - endif - - let s = match(line, '\<if\>') - if s > 0 - return s + g:haskell_indent_if - endif - endif - - let s = match(line, '\<do\s\+\zs[^{]\|\<where\s\+\zs\w\|\<let\s\+\zs\S\|^\s*\zs|\s') - if s > 0 - return s - endif - - let s = match(line, '\<case\>') - if s > 0 - return s + g:haskell_indent_case - endif - - return match(line, '\S') -endfunction |