summaryrefslogtreecommitdiff
path: root/vim/bundle/slimv/ftplugin/r/slimv-r.vim
blob: a5c8ec9cc0e6105819fc8eb72fc8aec366a6642e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
" slimv-r.vim:
"               R filetype plugin for Slimv
" Version:      0.9.13
" Last Change:  04 May 2014
" Maintainer:   Tamas Kovacs <kovisoft at gmail dot com>
" License:      This file is placed in the public domain.
"               No warranty, express or implied.
"               *** ***   Use At-Your-Own-Risk!   *** ***
"
" =====================================================================
"
"  Load Once:
if exists("b:did_ftplugin")
    finish
endif

" ---------- Begin part loaded once ----------
if !exists( 'g:slimv_lisp_loaded' )

let g:slimv_lisp_loaded = 1

" Try to autodetect Lisp executable
" Returns list [Lisp executable, Lisp implementation]
function! SlimvAutodetect( preferred )
    return ['R', 'R']
endfunction

" Try to find out the Lisp implementation
function! SlimvImplementation()
    return 'R'
endfunction

" Try to autodetect SWANK and build the command to load the SWANK server
function! SlimvSwankLoader()
endfunction

" Filetype specific initialization for the REPL buffer
function! SlimvInitRepl()
    set filetype=r
endfunction

" Lookup symbol in the list of Lisp Hyperspec symbol databases
function! SlimvHyperspecLookup( word, exact, all )
    return [ a:word ]
endfunction

" Source Slimv general part
runtime ftplugin/**/slimv.vim

endif "!exists( 'g:slimv_lisp_loaded' )
" ---------- End of part loaded once ----------

"runtime ftplugin/**/r.vim

" Must be called for each lisp buffer
call SlimvInitBuffer()

" Don't load another plugin for this buffer
let b:did_ftplugin = 1