forked from sophacles/vim-processing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessing.txt
More file actions
187 lines (145 loc) · 8.89 KB
/
Copy pathprocessing.txt
File metadata and controls
187 lines (145 loc) · 8.89 KB
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
*processing.txt* Processing and Vim Last Change: 2023 Jul 01
Authors: Szabolcs Horvát
Erich Heine
Guy John
Richard Gray
Crazy Master
Vítor Galvão
License: Distributed under the same terms as Vim itself. (see |license|)
CONTENTS *processing-contents*
Introduction |processing-intro|
Interface |processing-interface|
Commands |processing-cmd|
Key mappings |processing-key-mappings|
Variables |processing-variables|
Syntax Update |processing-syntax|
Known Issues |processing-issues|
Backwards Compatibility |processing-compatibility|
Contribution |processing-contribution|
==============================================================================
INTRODUCTION *processing-intro*
processing-vim is a plugin for integrating the Processing graphics programming
language and environment with vim. Since Processing 2.0 this has become
increasingly easy, and it is possible to use vim as a complete replacement to
the IDE provided with processing.
This plugin provides syntax highlighting, integration of the compiler and
vim's |:make|, and easy access to the help documentation. Basic usage is
accomplished by installing this plugin by unzipping it in your vim runtime
path (or in association with your favorite vim plugin manager). Then navigate
to the appropriate Processing directory and edit your sketches. When you're
ready to run them, simply pressing <F5> or doing :make will compile and run
the sketch - and provide a |quickfix| window of the errors processing
encounters.
OSX users please note that to use this plugin to it's fullest, you need to
install the processing-java command line manually, and this step must be done
each time processing is installed or upgraded. To do this simply use the menus
and navigate to: >
Tools -> Install processing-java
<and the installation will happen.
Processing-vim also provides access to the processing documentation by moving
the cursor over the target word and pressing K in normal mode. This will open
a browser pointed to the right place.
==============================================================================
INTERFACE *processing-interface*
------------------------------------------------------------------------------
COMMANDS *processing-cmd*
:RunProcessing *:RunProcessing*
Runs the compiler for processing, taking into account the settings
defined by the |processing-variables|. This works even with the
settings for backwards compatibility using the applescript hack on OSX
in conjunction with older processing versions ( < 2.0)
------------------------------------------------------------------------------
KEY MAPPINGS *processing-key-mappings*
<Plug>(processing-keyword) *<Plug>(processing-keyword)*
Opens a browser to the processing documentation for the item under the
cursor. The location of the documentation can be local or the web
version, depending on the value of |g:processing_doc_style|. If the
openbrowser plugin is available, it will use that, otherwise
processing-vim will attempt to open a browser on it's own.
<Plug>(processing-run) *<Plug>(processing-run)*
Runs the compiler for processing. For more info, see |:RunProcessing|.
*processing_default_key_mappings*
The following key mappings are available unless
|g:processing_no_default_mappings| is defined:
{lhs} {rhs}
-------- -----------------------------
K <Plug>(processing-keyword)
<F5> <Plug>(processing-run)
------------------------------------------------------------------------------
VARIABLES *processing-variables*
g:processing_doc_style *g:processing_doc_style*
Can be set to 'local' or 'web' . 'web' will point the browser at the
online documentation for processing when the K command is used.
'local' will point the browser to the documentation directory in
|g:processing_doc_path|.
g:processing_doc_path *g:processing_doc_path*
The base path for a local installation of the processing documentation.
g:processing_fold *g:processing_fold*
If this is defined, set the 'foldmethod' option to "syntax".
g:use_processing_applescript *g:use_processing_applescript*
If this is defined, processing-vim will use the older version of
compilation and script-running based on an apple script. This is
recommended only for backwards compatibility, not for versions of
processing newer than 2.0. For more info see |processing-applescript|.
g:processing_no_default_mappings *g:processing_no_default_mappings*
If this is defined, don't map the defalt key mappings.
==============================================================================
SYNTAX UPDATE *processing-syntax*
In the case the syntax, keywords and/or functions of the processing language
change before the script maintainers update it, or if you are using a
development version of Processing with a newer keywords.txt file, the tools/
directory has some tools to make this task simple.
These tools use python3, (>=python 3).
The steps are simple:
1. Get the latest keywords.txt from Processing. This is located in the
processing installation dir, under Java/modes/keywords.txt
https://github.com/processing/processing4/blob/main/java/keywords.txt
2. cd to the tools/ directory and run the make_syntax script. It takes one
argument, the path to the keywords.txt file, and prints the output to stdout.
On unix systems this can simply be redirected to a file. >
$> python make_syntax.py /path/to/processing/keywords.txt > \
../syntax/processing.vim.new
<Which will output the new syntax in the syntax directory.
3. Ensure the changes are OK for you - using the compare.py script in the
tools/ directory, you can see the changes between the two files. >
$> python compare.py ../syntax/processing.vim ../syntax/processing.vim.new
<If you're happy with the results you can replace the original syntax file
with the new file >
$> mv ../syntax/processing.vim.new ../syntax/processing.vim
<If not, edit the syntax until it is good. (Please consider creating an issue
for ways the utility did not satisfy your needs, with how you had to edit it.)
See the code in the tools/ directory for more detail on how these work and
additional options for using the utilities.
==============================================================================
KNOWN ISSUES *processing-issues*
* Due to processing-java's output, the error reporting leaves something to be
desired this will improve as processing-java improves
* Right now :make compiles and launches the sketch. New variable and commands
to control this behavior are in the works
==============================================================================
BACKWARDS COMPATIBILITY *processing-compatibility*
*processing-applescript*
Older versions of this plugin were intended to be used with processing 1.X,
which didn't export the processing-java command line tool. For Mac OSX users
this script included an AppleScript which could be used to provide limited
control over the processing runtime from within vim. If you have backwards
compatible needs, and wish to use this functionality on an OSX machine - you
can define |g:use_processing_applescript|. Then you must run the
Processing app, and set the "use external editor" setting. Once this is done,
you can use the processing runtime to compile and launch sketches with the
<F5> key.
Note: This function is no longer supported and will be phased out in
future versions.
==============================================================================
CONTRIBUTION *processing-contribution*
The processing-vim plugin is currently being maintained on github. The project
url is https://github.com/sophacles/vim-processing . All contributions and bug
reports should be done through this site.
People who have contributed to this plugin so far:
* Szabolcs Horvát (@szhorvat)
* Erich Heine (@sophacles)
* Guy John (@rumblesan)
* Richard Gray (@vortura)
* Crazy Master (@crazymaster)
* Vítor Galvão (@vitorgalvao)
vim:tw=78:et:ft=help:norl: