-
Notifications
You must be signed in to change notification settings - Fork 29
Tips and tricks
David Granström edited this page Jun 7, 2020
·
4 revisions
Various tips and tricks for scnvim!
Many tips are presented in autocmd
fashion so you can just copy and paste them to your init.vim
. If you don't want to use autocmd
for configuration look here instead.
Use an augroup
to avoid autocmd
build up.
Example augroup
" NOTE: the augroup called scnvim is reserved by the plugin
augroup scnvim_settings
autocmd FileType supercollider setlocal ...
augroup END
Indendation
autocmd FileType supercollider setlocal tabstop=4 softtabstop=4 shiftwidth=4
Wrap the post window output
autocmd FileType scnvim setlocal wrap
Map any piece of SuperCollider code to a key
autocmd FileType supercollider nnoremap <silent><buffer> <F2> :call scnvim#sclang#send('100.rand')<CR>
Map any piece of SuperCollider code to a key (silent version)
autocmd FileType supercollider nnoremap <silent><buffer> <F3> :call scnvim#sclang#send_silent('100.rand')<CR>
Custom mapping for block evaluation
autocmd FileType supercollider nmap <Space> <Plug>(scnvim-send-block)
First get the location of your config directory.
:echo stdpath('config')
In your shell, cd
to that directory and create after/ftplugin/supercollider.vim
then add settings using setlocal
.