diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-02-11 11:27:11 -0800 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-02-11 11:27:11 -0800 |
commit | 6cd2d5417d728ea96c5c52b34629c944a89eec60 (patch) | |
tree | f6d49573e7a22b1ede56055d3952707eab085c18 /ftplugin/scala.vim | |
parent | b7a30b1f1a963902d9743ae229a1f9d18b887e17 (diff) | |
download | vim-polyglot-6cd2d5417d728ea96c5c52b34629c944a89eec60.tar.gz vim-polyglot-6cd2d5417d728ea96c5c52b34629c944a89eec60.zip |
Updatev1.11.4
Diffstat (limited to 'ftplugin/scala.vim')
-rw-r--r-- | ftplugin/scala.vim | 81 |
1 files changed, 29 insertions, 52 deletions
diff --git a/ftplugin/scala.vim b/ftplugin/scala.vim index 3f0de967..d723eece 100644 --- a/ftplugin/scala.vim +++ b/ftplugin/scala.vim @@ -1,14 +1,33 @@ -setlocal formatoptions+=ro -setlocal commentstring=//%s -let &l:include = '^\s*import' -let &l:includeexpr = 'substitute(v:fname,"\\.","/","g")' +" Vim filetype plugin +" Language: Scala +" Maintainer: Derek Wyatt +" URL: https://github.com/derekwyatt/vim-scala +" License: Apache 2 +" ---------------------------------------------------------------------------- + +if exists('b:did_ftplugin') || &cp + finish +endif +let b:did_ftplugin = 1 + +" j is fairly new in Vim, so don't complain if it's not there +setlocal formatoptions-=t formatoptions+=croqnl +silent! setlocal formatoptions+=j + +" Just like c.vim, but additionally doesn't wrap text onto /** line when +" formatting. Doesn't bungle bulleted lists when formatting. +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,:// +setlocal commentstring=//\ %s + +setlocal shiftwidth=2 softtabstop=2 expandtab + +setlocal include='^\s*import' +setlocal includeexpr='substitute(v:fname,"\\.","/","g")' + setlocal path+=src/main/scala,src/test/scala setlocal suffixesadd=.scala -set makeprg=sbt\ -Dsbt.log.noformat=true\ compile -set efm=%E\ %#[error]\ %f:%l:\ %m,%C\ %#[error]\ %p^,%-C%.%#,%Z, - \%W\ %#[warn]\ %f:%l:\ %m,%C\ %#[warn]\ %p^,%-C%.%#,%Z, - \%-G%.%# +compiler sbt if globpath(&rtp, 'plugin/fuf.vim') != '' " @@ -127,49 +146,6 @@ if globpath(&rtp, 'plugin/fuf.vim') != '' endif endif -" If you want to disable the default key mappings, write the following line in -" your ~/.vimrc -" let g:scala_use_default_keymappings = 0 -if get(g:, 'scala_use_default_keymappings', 1) - nnoremap <buffer> <Leader>jt :call JustifyCurrentLine()<cr> -endif - -" -" TagBar -" -let g:tagbar_type_scala = { - \ 'ctagstype' : 'scala', - \ 'kinds' : [ - \ 'p:packages:1', - \ 'V:values', - \ 'v:variables', - \ 'T:types', - \ 't:traits', - \ 'o:objects', - \ 'a:aclasses', - \ 'c:classes', - \ 'r:cclasses', - \ 'm:methods' - \ ], - \ 'sro' : '.', - \ 'kind2scope' : { - \ 'T' : 'type', - \ 't' : 'trait', - \ 'o' : 'object', - \ 'a' : 'abstract class', - \ 'c' : 'class', - \ 'r' : 'case class' - \ }, - \ 'scope2kind' : { - \ 'type' : 'T', - \ 'trait' : 't', - \ 'object' : 'o', - \ 'abstract class' : 'a', - \ 'class' : 'c', - \ 'case class' : 'r' - \ } -\ } - function! s:CreateOrExpression(keywords) return '('.join(a:keywords, '|').')' endfunction @@ -191,5 +167,6 @@ function! s:NextSection(backwards) endfunction noremap <script> <buffer> <silent> ]] :call <SID>NextSection(0)<cr> - noremap <script> <buffer> <silent> [[ :call <SID>NextSection(1)<cr> + +" vim:set sw=2 sts=2 ts=8 et: |