summaryrefslogtreecommitdiffstats
path: root/ftplugin/cabal.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2016-05-02 10:42:37 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2016-05-02 10:42:37 +0200
commit5dd1a7e83966c92d220073185f1738dfe441f59e (patch)
tree9c4bee389a51a9bb111dcc894c9db0f6d1809d81 /ftplugin/cabal.vim
parentbc098370c1bb81840734f5764f431dee270e75ce (diff)
downloadvim-polyglot-5dd1a7e83966c92d220073185f1738dfe441f59e.tar.gz
vim-polyglot-5dd1a7e83966c92d220073185f1738dfe441f59e.zip
Update
Diffstat (limited to 'ftplugin/cabal.vim')
-rw-r--r--ftplugin/cabal.vim60
1 files changed, 0 insertions, 60 deletions
diff --git a/ftplugin/cabal.vim b/ftplugin/cabal.vim
index 0942397c..5c041bd3 100644
--- a/ftplugin/cabal.vim
+++ b/ftplugin/cabal.vim
@@ -6,64 +6,4 @@ endif
let g:loaded_haskellvim_cabal = 1
-function! s:makeSection(content)
- return "\n" . join(a:content, "\n")
-endfunction
-
-function! s:exeTmpl(name, src)
- let l:exetmpl = [ 'executable ' . a:name,
- \ '-- ghc-options:',
- \ 'main-is: ' . a:src,
- \ '-- other-modules:',
- \ '-- other-extensions:',
- \ 'build-depends: base',
- \ '-- hs-source-dirs:',
- \ 'default-language: Haskell2010'
- \ ]
-
- return s:makeSection(l:exetmpl)
-endfunction
-
-function! s:libTmpl()
- let l:libtmpl = [ 'library',
- \ '-- ghc-options:',
- \ '-- other-modules:',
- \ '-- other-extensions:',
- \ 'build-depends: base',
- \ '-- hs-source-dirs:',
- \ 'default-language: Haskell2010'
- \ ]
-
- return s:makeSection(l:libtmpl)
-endfunction
-
-function! s:flagTmpl(name)
- let l:flagtmpl = [ 'flag ' . a:name,
- \ 'description:',
- \ 'default: False',
- \ 'manual: True',
- \ ]
-
- return s:makeSection(l:flagtmpl)
-endfunction
-
-function! cabal#addExecutable()
- let l:name = input("Enter executable name: ")
- let l:src = input("Enter source file: ")
- exe "normal Go" . s:exeTmpl(l:name, l:src)
-endfunction
-
-function! cabal#addLibrary()
- exe "normal Go" . s:libTmpl()
-endfunction
-
-function! cabal#addFlag()
- let l:name = input("Enter flag name: ")
- exe "normal Go" . s:flagTmpl(l:name)
-endfunction
-
-command! -buffer CabalAddExecutable call cabal#addExecutable()
-command! -buffer CabalAddLibrary call cabal#addLibrary()
-command! -buffer CabalAddFlag call cabal#addFlag()
-
endif