aboutsummaryrefslogtreecommitdiffstats
path: root/.scvimrc
blob: 467e26641ed477c24bcd8cd09782adcf7e6540ad (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
let g:sclangKillOnExit = 1
let g:sclangTerm = "urxvt -e"
let g:sclangPipeLoc = "/tmp/sclang-pipe"
let g:sclangPipeAppPidLoc = "/tmp/sclangpipe_app-pid"
let g:scFlash = 1
let g:scSplitDirection = "h"
let g:scSplitSize = 25

au BufWinEnter,BufNewFile,BufRead *.sc set runtimepath+=/usr/share/vim/addons/ filetype=supercollider
au BufWinEnter,BufNewFile,BufRead *.sc runtime ftplugin/supercollider.vim
au BufWinEnter,BufNewFile,BufRead *.sc set sw=2 ts=2 autoindent "this line can be changed however you like

"scd files: on open set runtimepath and start sclang
au BufWinEnter,BufNewFile,BufRead *.scd set runtimepath+=/usr/share/vim/addons/ filetype=supercollider
au BufWinEnter,BufNewFile,BufRead *.scd runtime ftplugin/supercollider.vim | SClangStart
au BufWinEnter,BufNewFile,BufRead *.scd set sw=2 ts=2 autoindent

"sc help files
au BufWinEnter,BufNewFile,BufRead *.schelp set filetype=supercollider
au BufWinEnter,BufNewFile,BufRead *.schelp runtime ftplugin/supercollider.vim
au BufWinEnter,BufNewFile,BufRead *.schelp set sw=2 ts=2 autoindent "this line can be changed however you like

" ================ Indentation ======================

set autoindent
set smartindent
set smarttab
set shiftwidth=2
set softtabstop=2
set tabstop=2
set expandtab

filetype plugin on
filetype indent on

" Display tabs and trailing spaces visually
set list listchars=tab:\ \ ,trail:ยท

set nowrap       "Don't wrap lines
set linebreak    "Wrap lines at convenient points


"required for matching
au Filetype supercollider,supercollider_help let b:match_skip = 's:scComment\|scString\|scSymbol'
au Filetype supercollider,supercollider_help let b:match_words = '(:),[:],{:}'

"indenting if you want it
"au BufEnter,BufWinEnter,BufNewFile,BufRead *.sc runtime indent/sc_indent.vim


"supercollider vim keybindings
"expand('<cword>') gives current word under cursor without having to yank

au Filetype supercollider,supercollider_help nmap <buffer> K :call SChelp(expand('<cword>'))<CR>
au Filetype supercollider,supercollider_help imap <buffer>  :call SChelp(expand('<cword>'))<CR>
au Filetype supercollider,supercollider_help nmap <buffer>  :call SCdef(expand('<cword>'))<CR>
au Filetype supercollider,supercollider_help imap <buffer>  :call SCdef(expand('<cword>'))<CR>
au Filetype supercollider,supercollider_help nmap <buffer> <F1> :call HelpBrowser(expand('<cword>'))<CR>
au Filetype supercollider,supercollider_help imap <buffer> <F1> :call HelpBrowser(expand('<cword>'))<CR>a
au Filetype supercollider,supercollider_help vmap <buffer> <F1> :call HelpBrowser(expand('<cword>'))<CR>
au Filetype supercollider,supercollider_help nmap <buffer> <F5> :call SClang_block()<CR>
au Filetype supercollider,supercollider_help imap <buffer> <F5> :call SClang_block()<CR>a
au Filetype supercollider,supercollider_help vmap <buffer> <F5> :call SClang_send()<CR>
au Filetype supercollider,supercollider_help vmap <buffer> <F6> :call SClang_send()<CR>
au Filetype supercollider,supercollider_help nmap <buffer> <F6> :call SClang_send()<CR>
au Filetype supercollider,supercollider_help imap <buffer> <F6> :call SClang_send()<CR>a
au Filetype supercollider,supercollider_help nmap <buffer> <F7> :call SClang_TempoClock_clear()<CR>
au Filetype supercollider,supercollider_help imap <buffer> <F7> :call SClang_TempoClock_clear()<CR>a
au Filetype supercollider,supercollider_help nmap <buffer> <F8> :call SClang_free("s")<CR>
au Filetype supercollider,supercollider_help imap <buffer> <F8> :call SClang_free("s")<CR>a
au Filetype supercollider,supercollider_help nmap <buffer> <F12> :call SClang_thisProcess_stop()<CR>
au Filetype supercollider,supercollider_help imap <buffer> <F12> :call SClang_thisProcess_stop()<CR>a

"end of scvim (supercollider vim)