Skip to content

Commit 90a29d2

Browse files
committed
Remove help plugin stuff
IMO this just doesn't belong here, it ought to be a separate plugin or perhaps in Derek's personal ~/.vim/after/plugin :-) It doesn't even appear to apply to the current help file format for this project. I also didn't understand the change in 65e924f from derekwyatt#6 that put the `JustifyCurrentLine` mapping in `ftplugin/scala.vim` -- the function is for help files yet it was mapped buffer-local in Scala files. Goodbye. Also while I was looking at mappings, put the current ones in Vim doc.
1 parent aa662c5 commit 90a29d2

File tree

4 files changed

+46
-58
lines changed

4 files changed

+46
-58
lines changed

after/plugin/help.vim

Lines changed: 0 additions & 50 deletions
This file was deleted.

after/syntax/help.vim

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
let b:current_syntax = ''
2-
unlet b:current_syntax
1+
" Extends standard help syntax with highlighting of Scala code.
2+
"
3+
" Place code between !sc! and !/sc! delimiters. These will be hidden if Vim is
4+
" built with conceal support.
5+
6+
unlet! b:current_syntax
7+
38
syntax include @ScalaCode syntax/scala.vim
9+
410
if has('conceal')
511
syntax region rgnScala matchgroup=Ignore concealends start='!sc!' end='!/sc!' contains=@ScalaCode
612
else

doc/scala.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
*scala.txt* Syntax highlighting and helper functions for the Scala language.
22

3+
==============================================================================
34
INTRODUCTION *scala*
45

56
Syntax highlighting and helper functions for the scala language.
67

8+
==============================================================================
79
COMMANDS *scala-commands*
810

911
*:SortScalaImports*
@@ -41,4 +43,40 @@ COMMANDS *scala-commands*
4143
g:scala_first_party_namespaces=
4244
\ '\(controllers\|views\|models\)'
4345

46+
==============================================================================
47+
MAPPINGS *scala-mappings*
4448

49+
Currently the only mappings defined are for FuzzyFinder users--these will
50+
only be enabled if FuzzyFinder is detected.
51+
52+
*scala-leader-fs*
53+
<Leader>fs "Find src". Primes |:FufFile| with `src/main/scala`,
54+
and goes deeper still if only a single directory
55+
exists below that. Helpful for package namespacing
56+
like `src/main/scala/com/myorg`.
57+
58+
*scala-leader-ft*
59+
<Leader>ft "Find test". Like |scala-leader-fs|, but with
60+
`src/test/scala`.
61+
62+
*scala-leader-fr*
63+
<Leader>fr "Find from root". For the rarer cases when you want to
64+
start FuzzyFinder at project root (parent of `src/`).
65+
66+
Disabling Mappings~
67+
68+
If you wish to disable the default key mappings, write the following line in
69+
your ~/.vimrc: >
70+
71+
let g:scala_use_default_keymappings = 0
72+
73+
==============================================================================
74+
CREDITS *scala-credits*
75+
76+
Developed by Derek Wyatt, building on initial work by Stefan Matthias Aust.
77+
Distributed under the Apache 2 license.
78+
79+
Project's home and Git repository: https://github.com/derekwyatt/vim-scala
80+
81+
------------------------------------------------------------------------------
82+
vim:tw=78:ts=8:ft=help:norl:

ftplugin/scala.vim

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,6 @@ if globpath(&rtp, 'plugin/fuf.vim') != ''
130130
endif
131131
endif
132132

133-
" If you want to disable the default key mappings, write the following line in
134-
" your ~/.vimrc
135-
" let g:scala_use_default_keymappings = 0
136-
if get(g:, 'scala_use_default_keymappings', 1)
137-
nnoremap <buffer> <Leader>jt :call JustifyCurrentLine()<cr>
138-
endif
139133

140134
"
141135
" TagBar

0 commit comments

Comments
 (0)