/
README
132 lines (100 loc) · 4.87 KB
/
README
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
SCVIM
created by Alex Norman, it is in its early stages, use at your own risk
this is SCVIM-git
the webpage is here: http://www.x37v.info/projects/scvim/
if you have improvements/suggestions email alex at x37v dot info
________________________________________________________________________________
REQUIREMENTS:
- vim
- supercollider (sclang)
- ruby
- cmake
OPTIONAL:
- gvim or MacVim
________________________________________________________________________________
INSTALLATION STEPS:
Note: If you installed SuperCollider from source and didn't disable scvim when
running cmake, scvim should already be installed.
If you'd like to install scvim directly, without using the whole SuperCollider
install process you can do:
cmake . && sudo make install
You will have to enter your password in order to finalize the installation.
some people prefer to use a build directory [though scvim doesn't actually
build anything, but cmake does create some output files] to do that, from the
scvim directory, type:
mkdir build && cd build
cmake .. && sudo make install
Now you should be ready to use scvim, e.g. by running "scvim" or "scvim -g" from
a command prompt.
________________________________________________________________________________
OPTIONAL EXTRA INSTALLATION STEPS:
* If you want to be able to read supercollider files with syntax highlighting,
have the ability to start the language and have the keybindings you've set
up during a normal vim editing session [without launching as 'scvim'] then
source your scvimrc file in your ~/.vimrc
for example, if you have a ~/.scvimrc file you could put this line in your ~/.vimrc
so ~/.scvimrc
* I put this in my ~/.sclang.sc so that each time I start sclang I have updated
Object completion and highlighting, as well as Object Definition Lookup:
//set up the scvim stuff
SCVim.updateCaches;
You'll probably want to execute this at least once after an install of
supercollider to get the most up-to-date Object info
* sclang's working directory defaults to /tmp on linux and
/Applications/SuperCollider on mac when using scvim. If you want to
set it to something else you can set the bash environment variable
SCLANG_RUNDIR
* I've put the colorscheme that I use in the "extra" folder. This makes
strings, symbols and chars variations on the same color but all look
different. Feel free to use/modify it to your liking.
________________________________________________________________________________
USAGE:
defaults (most work in both command and insert mode):
:SClangStart starts/restarts the interpreter in an xterm
(if you want to recompile the supercollider library just type :SClangStart and you'll
kill the current interpreter, start up a new one and have a recompiled library)
:SClangKill
kills the xterm/interpreter
(exiting vim also kills the interpreter)
F5 sends a whole block (looks for the outermost parens and sends that data)
F6 sends a single line (the line the cursor is currently on)
F7 calls TempoClock.default.clear;
F8 calls s.freeAll;
F12 calls thisProcess.stop; (i.e. the same as cmd-. on Mac)
in visual mode F5 and F6 both send the whole visual block
use :SChelp to get to SC help topics, or use K on a word (in command mode)
(this has tab completion)
use :SCdef to see the class definitions for an object, or use ^k (in command or normal mode)
on a word (this also has tab completion)
These key bindings can all be changed through editing your scvimrc file.
________________________________________________________________________________
HELP DOCS:
scvim uses preprocessed versions of the help files (converted to plain-text),
and to update these help files from the main files you can run the following
line in sclang:
SCVim.updateHelpCache;
TROUBLE SHOOTING:
If you cannot find the scvim executable, make sure that "/usr/local/bin" is in
your PATH, this is where scvim is installed by default.
If you get errors about _FileWrite (like the error printed below) when you run
SCVim.updateHelpCache or SCVim.updateCaches it is likely that you don't have
write permissions for your scvim_cache_dir.
This directory is normally: ~/.scvim/
You can verify that by executing: SCVIM.scvim_cache_dir
Most often the solution is to do this: sudo chown -R <yourusername> ~/.scvim/
ERROR: Primitive '_FileWrite' failed.
Failed.
RECEIVER:
Instance of File { (B7837DD0, gc=40, fmt=00, flg=00, set=01)
instance variables [1]
fileptr : nil
}
________________________________________________________________________________
THANKS:
Dan Stowell for his help:
converting the SuperCollider code into a class, improving the README, getting scvim
into the SuperCollider svn, etc.
John Yates for providing the indent functionality [which I have changed slightly] and
help with the help file processor
Andrzej Kopec for work on removing html from help
Renick Bell for testing out the install process and providing notes.