Endlessly repeating...

Get started with MacVim and scvim

16 February 2011

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...

  1. Download a copy of the SuperCollider source from the SourceForge page
  2. Open up Terminal and cd to supercollider_source/editors/scvim
  3. The manual install instructions in the scvim readme are good so have a quick read of that
  4. Copy the executables from the bin directory to /usr/local/bin
  5. 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
  6. 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
  7. cd to /usr/local/bin and run ln -s /Applications/SuperCollider/sclang sclang
  8. To generate the help files you'll need to install links and unrtf, the easiest way to do this is through MacPorts
  9. After you've got links and unrtf, run scvim_make_help -l -c -s /Applications/SuperCollider/Help
  10. 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
  11. Next step is to edit .scvimrc so open that up in (presumably if you're reading this) vim
  12. Uncomment lines 33 and 34 (let g:sclangTerm = "open -a /Applications/Utilities/Terminal.app" and the subsequent line)
  13. Save your changes to .scvimrc
  14. Enter :source ~/.scvimrc in vim
  15. 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
  16. Enter :SClangStart in vim, hopefully a terminal window will come up showing the usual SuperCollider post window stuff
  17. 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.
  18. You can review the rest of the shortcuts that scvim adds by having a look at ~/.scvim