1 "for scvim (supercollider vim)
3 "this indicates the -d varaible [rundir] for running sclang in
5 "let $SCLANG_RUNDIR = "/home/user/scwork"
7 "set this to 0 if you don't want to kill the terminal with sclangpipe running
8 "in it when you exit vim
9 let g:sclangKillOnExit = 1
11 "this indicates the terminal emulator command you will use to launch
13 let g:sclangTerm = "" "Leave it blank like this for the autodetect (just below) to kick in
14 "let g:sclangTerm = "xterm -e"
16 "if setting is blank, this code checks for popular terminals:
18 if has('mac') || has('macunix')
19 "the following has worked with osx
20 let g:sclangTerm = "open -a /Applications/Utilities/Terminal.app"
21 let g:sclangPipeApp = "/usr/local/bin/sclangpipe_app"
22 " on debians (inc ubuntu) this 'alternatives' entry should point to the user's preferred term
24 for termcmd in ["/etc/alternatives/x-terminal-emulator", "xterm", "urxvtcd", "rxvt"]
25 if executable(termcmd)
26 let g:sclangTerm = termcmd . " -e"
32 echo "scvimrc warning: unable to detect terminal program, hoping xterm exists"
33 let g:sclangTerm = "xterm -e"
37 "this indicates the location to create a pipe for vim to communicate with
39 "defaults /tmp/sclang-pipe
40 "let g:sclangPipeLoc = "/tmp/sclang-pipe"
42 "this indicates a file where the process id for sclangpipe_app is stored
43 "default /tmp/sclangpipe_app-pid
44 "let g:sclangPipeAppPidLoc = "/tmp/sclangpipe_app-pid"
46 au BufWinEnter,BufNewFile,BufRead *.sc set filetype=supercollider
47 au BufWinEnter,BufNewFile,BufRead *.sc let &iskeyword="@,48-57,_,192-255" | runtime ftplugin/supercollider.vim
48 au BufWinEnter,BufNewFile,BufRead *.sc set sw=4 ts=4 autoindent "this line can be changed however you like
51 au BufWinEnter,BufNewFile,BufRead *.scd set filetype=supercollider
52 au BufWinEnter,BufNewFile,BufRead *.scd let &iskeyword="@,48-57,_,192-255,-,|" | runtime ftplugin/supercollider.vim
53 au BufWinEnter,BufNewFile,BufRead *.scd set sw=4 ts=4 autoindent "this line can be changed however you like
55 "required for matching
56 au Filetype supercollider,supercollider_help let b:match_skip = 's:scComment\|scString\|scSymbol'
57 au Filetype supercollider,supercollider_help let b:match_words = '(:),[:],{:}'
59 "indenting if you want it
60 "au BufEnter,BufWinEnter,BufNewFile,BufRead *.sc runtime indent/sc_indent.vim
63 "supercollider vim keybindings
64 "^R" gives contents of register "
66 au Filetype supercollider,supercollider_help nmap <buffer> K yiw :call SChelp("
\x12"")<CR>
67 au Filetype supercollider,supercollider_help imap <buffer>
\x1f \eyiw :call SChelp("
\x12"")<CR>
68 au Filetype supercollider,supercollider_help nmap <buffer>
\v yiw :call SCdef("
\x12"")<CR>
69 au Filetype supercollider,supercollider_help imap <buffer>
\v \eyiw :call SCdef("
\x12"")<CR>
70 au Filetype supercollider,supercollider_help nmap <buffer> <F1> :call HelpBrowser()<CR>
71 au Filetype supercollider,supercollider_help imap <buffer> <F1>
\e:call HelpBrowser()<CR>a
72 au Filetype supercollider,supercollider_help vmap <buffer> <F1>
\e:call HelpBrowser()<CR>
73 au Filetype supercollider,supercollider_help nmap <buffer> <F2> yiw :call HelpBrowser_find("
\x12"")<CR>
74 au Filetype supercollider,supercollider_help imap <buffer> <F2>
\eyiw :call HelpBrowser_find("
\x12"")<CR>a
75 au Filetype supercollider,supercollider_help vmap <buffer> <F2>
\eyiw :call HelpBrowser_find("
\x12"")<CR>
76 au Filetype supercollider,supercollider_help nmap <buffer> <F5> :call SClang_block()<CR>
77 au Filetype supercollider,supercollider_help imap <buffer> <F5>
\e:call SClang_block()<CR>a
78 au Filetype supercollider,supercollider_help vmap <buffer> <F5> :call SClang_send()<CR>
79 au Filetype supercollider,supercollider_help vmap <buffer> <F6> :call SClang_send()<CR>
80 au Filetype supercollider,supercollider_help nmap <buffer> <F6> :call SClang_send()<CR>
81 au Filetype supercollider,supercollider_help imap <buffer> <F6>
\e:call SClang_send()<CR>a
82 au Filetype supercollider,supercollider_help nmap <buffer> <F7> :call SClang_TempoClock_clear()<CR>
83 au Filetype supercollider,supercollider_help imap <buffer> <F7>
\e:call SClang_TempoClock_clear()<CR>a
84 au Filetype supercollider,supercollider_help nmap <buffer> <F8> :call SClang_free("s")<CR>
85 au Filetype supercollider,supercollider_help imap <buffer> <F8>
\e:call SClang_free("s")<CR>a
86 au Filetype supercollider,supercollider_help nmap <buffer> <F12> :call SClang_thisProcess_stop()<CR>
87 au Filetype supercollider,supercollider_help imap <buffer> <F12>
\e:call SClang_thisProcess_stop()<CR>a
89 "end of scvim (supercollider vim)