diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-10-10 16:56:22 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-10-10 16:56:22 +0200 |
commit | 0de043adbc144510635702dadedc946e3c69f64e (patch) | |
tree | 78e5d363305935cf5653a3f510ab86bb019c3199 /indent/cabal.vim | |
parent | 67fcbd2a8632d5ab7895e34acb084117e5d0ea17 (diff) | |
download | vim-polyglot-0de043adbc144510635702dadedc946e3c69f64e.tar.gz vim-polyglot-0de043adbc144510635702dadedc946e3c69f64e.zip |
Update
Diffstat (limited to 'indent/cabal.vim')
-rw-r--r-- | indent/cabal.vim | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/indent/cabal.vim b/indent/cabal.vim deleted file mode 100644 index b2089a5e..00000000 --- a/indent/cabal.vim +++ /dev/null @@ -1,35 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 - -" indentation for cabal -" -" author: raichoo (raichoo@googlemail.com) -" -if exists('b:did_indent') - finish -endif - -let b:did_indent = 1 - -if !exists('g:cabal_indent_section') - "executable name - ">>main-is: Main.hs - ">>hs-source-dirs: src - let g:cabal_indent_section = 2 -elseif exists('g:cabal_indent_section') && g:cabal_indent_section > 4 - let g:cabal_indent_section = 4 -endif - -setlocal indentexpr=GetCabalIndent() -setlocal indentkeys=!^F,o,O,<CR> - -function! GetCabalIndent() - let l:prevline = getline(v:lnum - 1) - - if l:prevline =~ '\C^\(executable\|library\|flag\|source-repository\|test-suite\|benchmark\)' - return g:cabal_indent_section - else - return match(l:prevline, '\S') - endif -endfunction - -endif |