Get started with MacVim and scvim
I made the switch from TextMate to MacVim about a month ago now and unlike my previous attempts to switch to Vim the change seems to have stuck this time. Of course once you find an editor you like there’s a desire to use it for everything you can and that meant getting scvim working. Here’s how it’s done…
- Download a copy of the SuperCollider source from the SourceForge page
- Open up Terminal and
cd
to supercollider_source/editors/scvim - The manual install instructions in the scvim readme are good so have a quick read of that
- Copy the executables from the bin directory to /usr/local/bin
- Copy the ftplugin, syntax and indent directories to ~/.vim. If you’re using Pathogen (and I’d recommend that you do) then create an scvim directory in ~/.vim/bundle and move the aforementioned directories there instead
- Copy the scclasses directory to ~/Library/Application Support/SuperCollider/Extensions. At this point I renamed the scclasses directory to something less generic but you don’t have to
cd
to /usr/local/bin and runln -s /Applications/SuperCollider/sclang sclang
- To generate the help files you’ll need to install links and unrtf, the easiest way to do this is through MacPorts
- After you’ve got links and unrtf, run
scvim_make_help -l -c -s /Applications/SuperCollider/Help
- scvim makes a lot of use of the function keys so quickly have a look at the keyboard options in system preferences and make sure that the option about using F1, F2, etc as standard function keys is set
- Next step is to edit .scvimrc so open that up in (presumably if you’re reading this) vim
- Uncomment lines 33 and 34 (
let g:sclangTerm = "open -a /Applications/Utilities/Terminal.app"
and the subsequent line) - Save your changes to .scvimrc
- Enter
:source ~/.scvimrc
in vim - Open a new file in vim called test.sc. The important bit is the .sc extension, this will prompt vim to load the SuperCollider commands
- Enter
:SClangStart
in vim, hopefully a terminal window will come up showing the usual SuperCollider post window stuff - At this point you should be able to run SuperCollider commands as normal. Try entering
s = Server.local.boot
and hitting F6, hopefully the server will boot. - You can review the rest of the shortcuts that scvim adds by having a look at ~/.scvim
Read other posts