├── .editorconfig
├── COPYING
├── README.rst
├── autoload
├── SingleCompile.vim
├── SingleCompile
│ └── templates
│ │ ├── ada.vim
│ │ ├── bash.vim
│ │ ├── c.vim
│ │ ├── cmake.vim
│ │ ├── coffee.vim
│ │ ├── cpp.vim
│ │ ├── cs.vim
│ │ ├── csh.vim
│ │ ├── d.vim
│ │ ├── dosbatch.vim
│ │ ├── elixir.vim
│ │ ├── erlang.vim
│ │ ├── fortran.vim
│ │ ├── go.vim
│ │ ├── haskell.vim
│ │ ├── html.vim
│ │ ├── idlang.vim
│ │ ├── java.vim
│ │ ├── javascript.vim
│ │ ├── kotlin.vim
│ │ ├── ksh.vim
│ │ ├── lisp.vim
│ │ ├── ls.vim
│ │ ├── lua.vim
│ │ ├── make.vim
│ │ ├── markdown.vim
│ │ ├── matlab.vim
│ │ ├── objc.vim
│ │ ├── ocaml.vim
│ │ ├── pascal.vim
│ │ ├── perl.vim
│ │ ├── php.vim
│ │ ├── python.vim
│ │ ├── qml.vim
│ │ ├── r.vim
│ │ ├── rst.vim
│ │ ├── ruby.vim
│ │ ├── rust.vim
│ │ ├── scala.vim
│ │ ├── sh.vim
│ │ ├── swift.vim
│ │ ├── tcl.vim
│ │ ├── tcsh.vim
│ │ ├── tex.vim
│ │ ├── vb.vim
│ │ ├── vim.vim
│ │ ├── xhtml.vim
│ │ └── zsh.vim
└── SingleCompileAsync.vim
├── doc
└── SingleCompile.txt
├── mkzip.sh
└── plugin
└── SingleCompile.vim
/.editorconfig:
--------------------------------------------------------------------------------
1 | ; This file is for unifying the coding style for different editors and IDEs.
2 | ; More information at http://EditorConfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | indent_style = space
8 | indent_size = 4
9 | end_of_line = lf
10 |
--------------------------------------------------------------------------------
/COPYING:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.rst:
--------------------------------------------------------------------------------
1 | Please visit the `project homepage`_ or `Vim Online`_ for more information.
2 |
3 | .. _project homepage: http://singlecompile.topbug.net
4 | .. _Vim Online: http://www.vim.org/scripts/script.php?script_id=3115
5 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/ada.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#ada#Initialize()
21 | call SingleCompile#SetCompilerTemplate('ada', 'gnat', 'GNAT', 'gnat',
22 | \'make', g:SingleCompile_common_run_command)
23 | call SingleCompile#SetOutfile('ada', 'gnat', g:SingleCompile_common_out_file)
24 | endfunction
25 |
26 | "vim703: cc=78
27 | "vim: et ts=4 tw=78 sw=4
28 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/bash.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#bash#Initialize()
21 | call SingleCompile#SetCompilerTemplate('bash', 'bash',
22 | \'Bourne-Again Shell', 'bash', '', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/c.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#c#Initialize()
21 | call SingleCompile#SetCompilerTemplate('c', 'open-watcom',
22 | \'Open Watcom C/C++32 Compiler', 'wcl386', '',
23 | \g:SingleCompile_common_run_command, function('SingleCompile#DetectWatcom'))
24 | call SingleCompile#SetCompilerTemplateByDict('c', 'open-watcom', {
25 | \ 'pre-do' : function('SingleCompile#PredoWatcom'),
26 | \ 'post-do' : function('SingleCompile#PostdoWatcom'),
27 | \ 'out-file': g:SingleCompile_common_out_file
28 | \})
29 | if has('win32')
30 | call SingleCompile#SetCompilerTemplate('c', 'msvc',
31 | \'Microsoft Visual C++ (In PATH)', 'cl',
32 | \'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
33 | call SingleCompile#SetOutfile('c', 'msvc', g:SingleCompile_common_out_file)
34 | call SingleCompile#SetCompilerTemplate('c', 'msvc80',
35 | \ 'Microsoft Visual C++ 2005 (8.0)', 'cl80',
36 | \ '-o $(FILE_TITLE)$', g:SingleCompile_common_run_command,
37 | \ function('SingleCompile#DetectMicrosoftVC'))
38 | call SingleCompile#SetCompilerTemplateByDict('c', 'msvc80', {
39 | \ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
40 | \ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
41 | \ 'out-file' : g:SingleCompile_common_out_file,
42 | \ 'priority' : 15,
43 | \ 'vim-compiler' : 'msvc'})
44 | call SingleCompile#SetCompilerTemplate('c', 'msvc90',
45 | \ 'Microsoft Visual C++ 2008 (9.0)', 'cl90',
46 | \ ' ', g:SingleCompile_common_run_command,
47 | \ function('SingleCompile#DetectMicrosoftVC'))
48 | call SingleCompile#SetCompilerTemplateByDict('c', 'msvc90', {
49 | \ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
50 | \ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
51 | \ 'out-file' : g:SingleCompile_common_out_file,
52 | \ 'priority' : 14,
53 | \ 'vim-compiler' : 'msvc'})
54 | call SingleCompile#SetCompilerTemplate('c', 'msvc100',
55 | \ 'Microsoft Visual C++ 2010 (10.0)', 'cl100',
56 | \ ' ', g:SingleCompile_common_run_command,
57 | \ function('SingleCompile#DetectMicrosoftVC'))
58 | call SingleCompile#SetCompilerTemplateByDict('c', 'msvc100', {
59 | \ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
60 | \ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
61 | \ 'out-file' : g:SingleCompile_common_out_file,
62 | \ 'priority' : 13,
63 | \ 'vim-compiler' : 'msvc'})
64 | call SingleCompile#SetCompilerTemplate('c', 'msvc110',
65 | \ 'Microsoft Visual C++ 2012 (11.0)', 'cl110',
66 | \ ' ', g:SingleCompile_common_run_command,
67 | \ function('SingleCompile#DetectMicrosoftVC'))
68 | call SingleCompile#SetCompilerTemplateByDict('c', 'msvc110', {
69 | \ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
70 | \ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
71 | \ 'out-file' : g:SingleCompile_common_out_file,
72 | \ 'priority' : 12,
73 | \ 'vim-compiler' : 'msvc'})
74 | call SingleCompile#SetCompilerTemplate('c', 'bcc',
75 | \'Borland C++ Builder', 'bcc32',
76 | \'-o$(FILE_TITLE)$', g:SingleCompile_common_run_command)
77 | call SingleCompile#SetOutfile('c', 'bcc', g:SingleCompile_common_out_file)
78 | endif
79 | call SingleCompile#SetCompilerTemplate('c', 'gcc', 'GNU C Compiler',
80 | \'gcc', '-g -o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
81 | call SingleCompile#SetCompilerTemplateByDict('c', 'gcc', {
82 | \ 'pre-do' : function('SingleCompile#PredoGcc'),
83 | \ 'priority' : 20,
84 | \ 'out-file': g:SingleCompile_common_out_file
85 | \})
86 | call SingleCompile#SetCompilerTemplate('c', 'icc',
87 | \'Intel C++ Compiler', 'icc', '-o $(FILE_TITLE)$',
88 | \g:SingleCompile_common_run_command)
89 | call SingleCompile#SetOutfile('c', 'icc', g:SingleCompile_common_out_file)
90 | if has('win32')
91 | call SingleCompile#SetCompilerTemplate('c', 'lcc',
92 | \'Little C Compiler', 'lc',
93 | \'$(FILE_TITLE)$ -o "$(FILE_TITLE)$.exe"',
94 | \g:SingleCompile_common_run_command)
95 | else
96 | call SingleCompile#SetCompilerTemplate('c', 'lcc',
97 | \'Little C Compiler', 'lc',
98 | \'$(FILE_TITLE)$ -o $(FILE_TITLE)$',
99 | \g:SingleCompile_common_run_command)
100 | endif
101 | call SingleCompile#SetOutfile('c', 'lcc', g:SingleCompile_common_out_file)
102 | call SingleCompile#SetCompilerTemplate('c', 'pcc',
103 | \'Portable C Compiler', 'pcc', '-o $(FILE_TITLE)$',
104 | \g:SingleCompile_common_run_command)
105 | call SingleCompile#SetOutfile('c', 'pcc', g:SingleCompile_common_out_file)
106 | call SingleCompile#SetCompilerTemplate('c', 'tcc', 'Tiny C Compiler',
107 | \'tcc', '-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
108 | call SingleCompile#SetOutfile('c', 'tcc', g:SingleCompile_common_out_file)
109 | call SingleCompile#SetCompilerTemplate('c', 'tcc-run',
110 | \'Tiny C Compiler with "-run" Flag', 'tcc', '-run', '')
111 | call SingleCompile#SetPriority('c', 'tcc-run', 140)
112 | call SingleCompile#SetCompilerTemplate('c', 'ch',
113 | \'SoftIntegration Ch', 'ch', '', '')
114 | call SingleCompile#SetPriority('c', 'ch', 130)
115 | call SingleCompile#SetCompilerTemplate('c', 'clang',
116 | \ 'the Clang C and Objective-C compiler', 'clang',
117 | \'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
118 | call SingleCompile#SetCompilerTemplateByDict('c', 'clang', {
119 | \ 'pre-do' : function('SingleCompile#PredoClang'),
120 | \ 'out-file': g:SingleCompile_common_out_file
121 | \})
122 | if has('unix')
123 | call SingleCompile#SetCompilerTemplate('c', 'cc',
124 | \'UNIX C Compiler', 'cc', '-o $(FILE_TITLE)$',
125 | \g:SingleCompile_common_run_command)
126 | call SingleCompile#SetOutfile('c', 'cc', g:SingleCompile_common_out_file)
127 | call SingleCompile#SetCompilerTemplate('c', 'sol-studio',
128 | \'Sun C Compiler (Sun Solaris Studio)', 'suncc',
129 | \'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
130 | call SingleCompile#SetCompilerTemplateByDict('c', 'sol-studio', {
131 | \ 'pre-do' : function('SingleCompile#PredoSolStudioC'),
132 | \ 'out-file': g:SingleCompile_common_out_file
133 | \})
134 | call SingleCompile#SetCompilerTemplate('c', 'open64',
135 | \'Open64 C Compiler', 'opencc', '-o $(FILE_TITLE)$',
136 | \g:SingleCompile_common_run_command)
137 | endif
138 | endfunction
139 |
140 | "vim703: cc=78
141 | "vim: et ts=4 tw=78 sw=4
142 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/cmake.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#cmake#Initialize()
21 | call SingleCompile#SetCompilerTemplate('cmake', 'cmake', 'cmake',
22 | \'cmake', '', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/coffee.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2013 Rack Lin
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#coffee#Initialize()
21 | call SingleCompile#SetCompilerTemplate('coffee', 'coffee',
22 | \'CoffeeScript', 'coffee', '-c $(FILE_NAME)$', 'coffee $(FILE_NAME)$')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/cpp.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#cpp#Initialize()
21 | call SingleCompile#SetCompilerTemplate('cpp', 'open-watcom',
22 | \'Open Watcom C/C++32 Compiler',
23 | \ 'wcl386', '', g:SingleCompile_common_run_command,
24 | \ function('SingleCompile#DetectWatcom'))
25 | call SingleCompile#SetCompilerTemplateByDict('cpp', 'open-watcom', {
26 | \ 'pre-do' : function('SingleCompile#PredoWatcom'),
27 | \ 'post-do' : function('SingleCompile#PostdoWatcom'),
28 | \ 'out-file': g:SingleCompile_common_out_file
29 | \})
30 | if has('win32')
31 | call SingleCompile#SetCompilerTemplate('cpp', 'msvc',
32 | \'Microsoft Visual C++ (In PATH)', 'cl',
33 | \'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
34 | call SingleCompile#SetOutfile('cpp', 'msvc', g:SingleCompile_common_out_file)
35 | call SingleCompile#SetCompilerTemplate('cpp', 'msvc80',
36 | \ 'Microsoft Visual C++ 2005 (8.0)', 'cl80',
37 | \ '-o $(FILE_TITLE)$', g:SingleCompile_common_run_command,
38 | \ function('SingleCompile#DetectMicrosoftVC'))
39 | call SingleCompile#SetCompilerTemplateByDict('cpp', 'msvc80', {
40 | \ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
41 | \ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
42 | \ 'out-file' : g:SingleCompile_common_out_file,
43 | \ 'priority' : 15,
44 | \ 'vim-compiler' : 'msvc'})
45 | call SingleCompile#SetCompilerTemplate('cpp', 'msvc90',
46 | \ 'Microsoft Visual C++ 2008 (9.0)', 'cl90',
47 | \ '/EHsc', g:SingleCompile_common_run_command,
48 | \ function('SingleCompile#DetectMicrosoftVC'))
49 | call SingleCompile#SetCompilerTemplateByDict('cpp', 'msvc90', {
50 | \ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
51 | \ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
52 | \ 'out-file' : g:SingleCompile_common_out_file,
53 | \ 'priority' : 14,
54 | \ 'vim-compiler' : 'msvc'})
55 | call SingleCompile#SetCompilerTemplate('cpp', 'msvc100',
56 | \ 'Microsoft Visual C++ 2010 (10.0)', 'cl100',
57 | \ '/EHsc', g:SingleCompile_common_run_command,
58 | \ function('SingleCompile#DetectMicrosoftVC'))
59 | call SingleCompile#SetCompilerTemplateByDict('cpp', 'msvc100', {
60 | \ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
61 | \ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
62 | \ 'out-file' : g:SingleCompile_common_out_file,
63 | \ 'priority' : 13,
64 | \ 'vim-compiler' : 'msvc'})
65 | call SingleCompile#SetCompilerTemplate('cpp', 'msvc110',
66 | \ 'Microsoft Visual C++ 2012 (11.0)', 'cl110',
67 | \ '/EHsc', g:SingleCompile_common_run_command,
68 | \ function('SingleCompile#DetectMicrosoftVC'))
69 | call SingleCompile#SetCompilerTemplateByDict('cpp', 'msvc110', {
70 | \ 'pre-do' : function('SingleCompile#PredoMicrosoftVC'),
71 | \ 'post-do' : function('SingleCompile#PostdoMicrosoftVC'),
72 | \ 'out-file' : g:SingleCompile_common_out_file,
73 | \ 'priority' : 12,
74 | \ 'vim-compiler' : 'msvc'})
75 | call SingleCompile#SetCompilerTemplate('cpp', 'bcc',
76 | \'Borland C++ Builder','bcc32', '-o$(FILE_TITLE)$',
77 | \g:SingleCompile_common_run_command)
78 | call SingleCompile#SetOutfile('cpp', 'bcc', g:SingleCompile_common_out_file)
79 | endif
80 | call SingleCompile#SetCompilerTemplate('cpp', 'g++',
81 | \'GNU C++ Compiler', 'g++', '-g -o $(FILE_TITLE)$',
82 | \g:SingleCompile_common_run_command)
83 | call SingleCompile#SetCompilerTemplateByDict('cpp', 'g++', {
84 | \ 'pre-do' : function('SingleCompile#PredoGcc'),
85 | \ 'out-file': g:SingleCompile_common_out_file,
86 | \ 'priority' : 20,
87 | \ 'vim-compiler': 'gcc'
88 | \})
89 | call SingleCompile#SetCompilerTemplate('cpp', 'icc',
90 | \'Intel C++ Compiler', 'icc', '-o $(FILE_TITLE)$',
91 | \g:SingleCompile_common_run_command)
92 | call SingleCompile#SetOutfile('cpp', 'icc', g:SingleCompile_common_out_file)
93 | call SingleCompile#SetCompilerTemplate('cpp', 'ch',
94 | \'SoftIntegration Ch', 'ch', '', '')
95 | call SingleCompile#SetPriority('cpp', 'ch', 130)
96 | call SingleCompile#SetCompilerTemplate('cpp', 'clang',
97 | \ 'the Clang C and Objective-C compiler',
98 | \'clang++', '-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
99 | call SingleCompile#SetCompilerTemplateByDict('cpp', 'clang', {
100 | \ 'pre-do' : function('SingleCompile#PredoClang'),
101 | \ 'out-file': g:SingleCompile_common_out_file,
102 | \ 'vim-compiler': 'clang'
103 | \})
104 | if has('unix')
105 | call SingleCompile#SetCompilerTemplate('cpp', 'sol-studio',
106 | \'Sun C++ Compiler (Sun Solaris Studio)', 'sunCC',
107 | \'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
108 | call SingleCompile#SetCompilerTemplateByDict('cpp', 'sol-studio',{
109 | \ 'pre-do' : function('SingleCompile#PredoSolStudioC'),
110 | \ 'out-file': g:SingleCompile_common_out_file
111 | \})
112 | call SingleCompile#SetCompilerTemplate('cpp', 'open64',
113 | \'Open64 C++ Compiler', 'openCC',
114 | \'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
115 | call SingleCompile#SetOutfile('cpp', 'open64', g:SingleCompile_common_out_file)
116 | endif
117 | endfunction
118 |
119 | "vim703: cc=78
120 | "vim: et ts=4 tw=78 sw=4
121 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/cs.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#cs#Initialize()
21 | if has('win32')
22 | call SingleCompile#SetCompilerTemplate('cs', 'msvcs',
23 | \'Microsoft Visual C#', 'csc', '',
24 | \g:SingleCompile_common_run_command)
25 | call SingleCompile#SetOutfile('cs', 'msvcs',
26 | \g:SingleCompile_common_out_file)
27 | call SingleCompile#SetPriority('cs', 'msvcs', 50)
28 | call SingleCompile#SetVimCompiler('cs', 'msvcs', 'cs')
29 | endif
30 | call SingleCompile#SetCompilerTemplate('cs', 'mono',
31 | \'Mono C# compiler', 'mcs', '',
32 | \'mono $(FILE_TITLE)$'.'.exe')
33 | call SingleCompile#SetOutfile('cs', 'mono',
34 | \'$(FILE_TITLE)$'.'.exe')
35 | call SingleCompile#SetVimCompiler('cs', 'mono', 'mcs')
36 | endfunction
37 |
38 | "vim703: cc=78
39 | "vim: et ts=4 tw=78 sw=4
40 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/csh.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#csh#Initialize()
21 | call SingleCompile#SetCompilerTemplate('csh', 'csh',
22 | \'C Shell', 'csh', '', '')
23 | call SingleCompile#SetCompilerTemplate('csh', 'tcsh',
24 | \'TENEX C shell', 'tcsh', '', '')
25 | call SingleCompile#SetPriority('csh', 'tcsh', 80)
26 | endfunction
27 |
28 | "vim703: cc=78
29 | "vim: et ts=4 tw=78 sw=4
30 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/d.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#d#Initialize()
21 | call SingleCompile#SetCompilerTemplate('d', 'dmd', 'DMD Compiler',
22 | \'dmd', '', g:SingleCompile_common_run_command)
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/dosbatch.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#dosbatch#Initialize()
21 | if has('win32')
22 | let l:cmd_path = $SYSTEMROOT . '\System32\cmd.exe'
23 |
24 | call SingleCompile#SetCompilerTemplate('dosbatch', 'dosbatch',
25 | \'DOS Batch', l:cmd_path, '/C', '')
26 | endif
27 | endfunction
28 |
29 | "vim703: cc=78
30 | "vim: et ts=4 tw=78 sw=4
31 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/elixir.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2015 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#elixir#Initialize()
21 | call SingleCompile#SetCompilerTemplate('elixir', 'elixir',
22 | \'Elixir', 'elixir', '', '')
23 | endfunction
24 |
25 |
26 | "vim703: cc=78
27 | "vim: et ts=4 tw=78 sw=4
28 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/erlang.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#erlang#Initialize()
21 | call SingleCompile#SetCompilerTemplate('erlang', 'escript',
22 | \'Erlang Scripting Support', 'escript', '', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/fortran.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#fortran#Initialize()
21 | call SingleCompile#SetCompilerTemplate('fortran', 'gfortran',
22 | \'GNU Fortran Compiler', 'gfortran',
23 | \'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
24 | call SingleCompile#SetOutfile('fortran', 'gfortran',
25 | \g:SingleCompile_common_out_file)
26 | call SingleCompile#SetPriority('fortran', 'gfortran', 70)
27 | call SingleCompile#SetCompilerTemplate('fortran', 'g95',
28 | \'G95', 'g95', '-o $(FILE_TITLE)$'.SingleCompile#GetExecutableSuffix(),
29 | \g:SingleCompile_common_run_command)
30 | call SingleCompile#SetOutfile('fortran', 'g95', g:SingleCompile_common_out_file)
31 | if has('unix')
32 | call SingleCompile#SetCompilerTemplate('fortran',
33 | \'sol-studio-f77',
34 | \'Sun Fortran 77 Compiler (Sun Solaris Studio)',
35 | \'sunf77', '-o $(FILE_TITLE)$',
36 | \g:SingleCompile_common_run_command)
37 | call SingleCompile#SetOutfile('fortran', 'sol-studio-f77',
38 | \g:SingleCompile_common_out_file)
39 | call SingleCompile#SetCompilerTemplate('fortran',
40 | \'sol-studio-f90',
41 | \'Sun Fortran 90 Compiler (Sun Solaris Studio)',
42 | \'sunf90', '-o $(FILE_TITLE)$',
43 | \g:SingleCompile_common_run_command)
44 | call SingleCompile#SetOutfile('fortran', 'sol-studio-f90',
45 | \g:SingleCompile_common_out_file)
46 | call SingleCompile#SetCompilerTemplate('fortran',
47 | \'sol-studio-f95',
48 | \'Sun Fortran 95 Compiler (Sun Solaris Studio)',
49 | \'sunf95', '-o $(FILE_TITLE)$',
50 | \g:SingleCompile_common_run_command)
51 | call SingleCompile#SetOutfile('fortran', 'sol-studio-f95',
52 | \g:SingleCompile_common_out_file)
53 | call SingleCompile#SetCompilerTemplate('fortran', 'open64-f90',
54 | \'Open64 Fortran 90 Compiler', 'openf90',
55 | \'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
56 | call SingleCompile#SetOutfile('fortran', 'open64-f90',
57 | \g:SingleCompile_common_out_file)
58 | call SingleCompile#SetCompilerTemplate('fortran', 'open64-f95',
59 | \'Open64 Fortran 95 Compiler', 'openf95',
60 | \'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
61 | call SingleCompile#SetOutfile('fortran', 'open64-f95',
62 | \g:SingleCompile_common_out_file)
63 | endif
64 | if has('win32')
65 | call SingleCompile#SetCompilerTemplate('fortran', 'ftn95',
66 | \'Silverfrost FTN95', 'ftn95', '$(FILE_NAME)$ /LINK',
67 | \g:SingleCompile_common_run_command)
68 | call SingleCompile#SetOutfile('fortran', 'ftn95',
69 | \g:SingleCompile_common_out_file)
70 | endif
71 | call SingleCompile#SetCompilerTemplate('fortran', 'g77',
72 | \'GNU Fortran 77 Compiler', 'g77', '-o $(FILE_TITLE)$',
73 | \g:SingleCompile_common_run_command)
74 | call SingleCompile#SetOutfile('fortran', 'g77', g:SingleCompile_common_out_file)
75 | call SingleCompile#SetVimCompiler('fortran', 'g77', 'fortran_g77')
76 | call SingleCompile#SetCompilerTemplate('fortran', 'ifort',
77 | \'Intel Fortran Compiler', 'ifort', '-o $(FILE_TITLE)$',
78 | \g:SingleCompile_common_run_command)
79 | call SingleCompile#SetOutfile('fortran', 'ifort', g:SingleCompile_common_out_file)
80 | call SingleCompile#SetPriority('fortran', 'ifort', 80)
81 | call SingleCompile#SetCompilerTemplate('fortran', 'open-watcom',
82 | \'Open Watcom Fortran 77/32 Compiler', 'wfl386', '',
83 | \g:SingleCompile_common_run_command, function('SingleCompile#DetectWatcom'))
84 | call SingleCompile#SetCompilerTemplateByDict('fortran', 'open-watcom',
85 | \{
86 | \ 'pre-do' : function('SingleCompile#PredoWatcom'),
87 | \ 'post-do' : function('SingleCompile#PostdoWatcom'),
88 | \ 'out-file': g:SingleCompile_common_out_file
89 | \})
90 | endfunction
91 |
92 | "vim703: cc=78
93 | "vim: et ts=4 tw=78 sw=4
94 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/go.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#go#Initialize()
21 | call SingleCompile#SetCompilerTemplate('go', 'go', 'Go',
22 | \ 'go', 'build -o $(FILE_EXEC)$', g:SingleCompile_common_run_command)
23 | call SingleCompile#SetPriority('go', 'Go', 20)
24 | endfunction
25 |
26 | "vim703: cc=78
27 | "vim: et ts=4 tw=78 sw=4
28 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/haskell.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#haskell#Initialize()
21 | " stack-runhaskell
22 | call SingleCompile#SetCompilerTemplate('haskell', 'stack-runhaskell',
23 | \'The Haskell Tool Stack (stack exec -- runhaskell)', 'stack', 'exec -- runhaskell', '')
24 | call SingleCompile#SetPriority('haskell', 'stack-runhaskell', 10)
25 |
26 | " runhaskell
27 | call SingleCompile#SetCompilerTemplate('haskell', 'runhaskell',
28 | \'runhaskell', 'runhaskell', '', '')
29 | call SingleCompile#SetPriority('haskell', 'runhaskell', 20)
30 |
31 | " stack-ghc
32 | call SingleCompile#SetCompilerTemplate('haskell', 'stack-ghc',
33 | \'The Haskell Tool Stack (stack exec -- ghc)', 'stack', 'exec -- ghc -o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
34 | call SingleCompile#SetOutfile('haskell', 'stack-ghc', g:SingleCompile_common_out_file)
35 | call SingleCompile#SetPriority('haskell', 'stack-ghc', 15)
36 |
37 | " ghc
38 | call SingleCompile#SetCompilerTemplate('haskell', 'ghc',
39 | \'Glasgow Haskell Compiler', 'ghc', '-o $(FILE_TITLE)$',
40 | \g:SingleCompile_common_run_command)
41 | call SingleCompile#SetOutfile('haskell', 'ghc', g:SingleCompile_common_out_file)
42 | call SingleCompile#SetPriority('haskell', 'ghc', 25)
43 | endfunction
44 |
45 | "vim703: cc=78
46 | "vim: et ts=4 tw=78 sw=4
47 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/html.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#html#Initialize()
21 | call SingleCompile#SetCompilerTemplate('html', 'firefox',
22 | \'Mozilla Firefox', 'firefox', '', '')
23 | call SingleCompile#SetPriority('html', 'firefox', 60)
24 | call SingleCompile#SetCompilerTemplate('html', 'chrome',
25 | \'Google Chrome', 'google-chrome', '', '')
26 | call SingleCompile#SetPriority('html', 'chrome', 70)
27 | call SingleCompile#SetCompilerTemplate('html', 'chromium',
28 | \'Chromium', 'chromium', '', '')
29 | call SingleCompile#SetPriority('html', 'chromium', 71)
30 | call SingleCompile#SetCompilerTemplate('html', 'opera', 'Opera',
31 | \'opera', '', '')
32 | call SingleCompile#SetPriority('html', 'opera', 80)
33 | call SingleCompile#SetCompilerTemplate('html', 'konqueror',
34 | \'Konqueror', 'konqueror', '', '')
35 | call SingleCompile#SetCompilerTemplate('html', 'arora',
36 | \'Arora', 'arora', '', '')
37 | call SingleCompile#SetCompilerTemplate('html', 'epiphany',
38 | \'Epiphany', 'epiphany', '', '')
39 | if has('win32')
40 | call SingleCompile#SetCompilerTemplate('html', 'ie',
41 | \'Microsoft Internet Explorer', 'iexplore', '', '',
42 | \function('SingleCompile#DetectIe'))
43 | call SingleCompile#SetPriority('html', 'ie', 50)
44 | else
45 | call SingleCompile#SetCompilerTemplate('html', 'ie',
46 | \'Microsoft Internet Explorer', 'iexplore', '', '')
47 | endif
48 | endfunction
49 |
50 | "vim703: cc=78
51 | "vim: et ts=4 tw=78 sw=4
52 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/idlang.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#idlang#Initialize()
21 | call SingleCompile#SetCompilerTemplate('idlang', 'idl',
22 | \'ITT Visual Information Solutions '.
23 | \'Interactive Data Language', 'idl',
24 | \"-quiet -e '.run $(FILE_NAME)$'", '')
25 | call SingleCompile#SetPriority('idlang', 'idl', 70)
26 | call SingleCompile#SetCompilerTemplate('idlang', 'gdl',
27 | \'GNU Data Language incremental compiler',
28 | \'gdl', "-quiet -e '.run $(FILE_NAME)$'", '')
29 | endfunction
30 |
31 | "vim703: cc=78
32 | "vim: et ts=4 tw=78 sw=4
33 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/java.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#java#Initialize()
21 | call SingleCompile#SetCompilerTemplate('java', 'sunjdk',
22 | \ 'Sun Java Development Kit', 'javac', '',
23 | \'java $(FILE_TITLE)$')
24 | call SingleCompile#SetOutfile('java', 'sunjdk',
25 | \'$(FILE_TITLE)$'.'.class')
26 | call SingleCompile#SetVimCompiler('java', 'sunjdk', 'javac')
27 | call SingleCompile#SetPriority('java', 'sunjdk', 70)
28 | call SingleCompile#SetCompilerTemplate('java', 'gcj',
29 | \'GNU Java Compiler', 'gcj', '', 'java $(FILE_TITLE)$')
30 | call SingleCompile#SetOutfile('java', 'gcj', '$(FILE_TITLE)$'.'.class')
31 | endfunction
32 |
33 | "vim703: cc=78
34 | "vim: et ts=4 tw=78 sw=4
35 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/javascript.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#javascript#Initialize()
21 | call SingleCompile#SetCompilerTemplate('javascript', 'gjs',
22 | \'Javascript Bindings for GNOME', 'gjs', '', '')
23 | call SingleCompile#SetPriority('javascript', 'gjs', 120)
24 | call SingleCompile#SetCompilerTemplate('javascript', 'js',
25 | \'SpiderMonkey, a JavaScript engine written in C',
26 | \'js', '', '')
27 | call SingleCompile#SetCompilerTemplate('javascript', 'node.js',
28 | \'node.js', 'node', '', '')
29 | call SingleCompile#SetCompilerTemplate('javascript', 'rhino',
30 | \'Rhino, a JavaScript engine written in Java',
31 | \'rhino', '', '')
32 | endfunction
33 |
34 | "vim703: cc=78
35 | "vim: et ts=4 tw=78 sw=4
36 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/kotlin.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2018 lazywhite
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#kotlin#Initialize()
21 | call SingleCompile#SetCompilerTemplate('kotlin', 'kotlinc', 'kotlinc',
22 | \ 'kotlinc', ' -script $(FILE_NAME)$', "")
23 | call SingleCompile#SetPriority('kotlin', 'kotlinc', 20)
24 | endfunction
25 |
26 | "vim703: cc=78
27 | "vim: et ts=4 tw=78 sw=4
28 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/ksh.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#ksh#Initialize()
21 | call SingleCompile#SetCompilerTemplate('ksh', 'ksh',
22 | \'Korn Shell', 'ksh', '', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/lisp.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#lisp#Initialize()
21 | call SingleCompile#SetCompilerTemplate('lisp', 'clisp', 'GNU CLISP',
22 | \'clisp', '', '')
23 | call SingleCompile#SetCompilerTemplate('lisp', 'ecl',
24 | \'Embeddable Common-Lisp', 'ecl', '-shell', '')
25 | call SingleCompile#SetCompilerTemplate('lisp', 'gcl',
26 | \'GNU Common Lisp', 'gcl', '-batch -load', '')
27 | endfunction
28 |
29 | "vim703: cc=78
30 | "vim: et ts=4 tw=78 sw=4
31 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/ls.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Rack Lin
2 | "
3 |
4 | " This file is part of SingleCompile.
5 |
6 | " SingleCompile is free software: you can redistribute it and/or modify
7 | " it under the terms of the GNU General Public License as published by
8 | " the Free Software Foundation, either version 3 of the License, or
9 | " (at your option) any later version.
10 |
11 | " SingleCompile is distributed in the hope that it will be useful,
12 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | " GNU General Public License for more details.
15 |
16 | " You should have received a copy of the GNU General Public License
17 | " along with SingleCompile. If not, see .
18 |
19 | " check doc/SingleCompile.txt for more information
20 |
21 | function! SingleCompile#templates#ls#Initialize()
22 | call SingleCompile#SetCompilerTemplate('ls', 'lsc',
23 | \'LiveScript', 'lsc', '-c $(FILE_NAME)$', 'lsc $(FILE_NAME)$')
24 | endfunction
25 |
26 | "vim703: cc=78
27 | "vim: et ts=4 tw=78 sw=4
28 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/lua.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#lua#Initialize()
21 | call SingleCompile#SetCompilerTemplate('lua', 'lua',
22 | \'Lua Interpreter', 'lua', '', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/make.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! s:DetectGmake(not_used_arg)
21 | let l:make_command = s:DetectCompilerGenerally('gmake')
22 | if l:make_command != 0
23 | return l:make_command
24 | endif
25 |
26 | let l:make_command = s:DetectCompilerGenerally('make')
27 | if l:make_command != 0
28 | return l:make_command
29 | endif
30 |
31 | return 0
32 | endfunction
33 |
34 | function! SingleCompile#templates#make#Initialize()
35 | call SingleCompile#SetCompilerTemplate('make', 'gmake', 'GNU Make',
36 | \'gmake', '-f', '', function('s:DetectGmake'))
37 | call SingleCompile#SetCompilerTemplate('make', 'mingw32-make',
38 | \'MinGW32 Make', 'mingw32-make', '-f', '')
39 | if has('win32')
40 | call SingleCompile#SetCompilerTemplate('make', 'nmake',
41 | \'Microsoft Program Maintenance Utility', 'nmake',
42 | \'-f', '')
43 | endif
44 | endfunction
45 |
46 | "vim703: cc=78
47 | "vim: et ts=4 tw=78 sw=4
48 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/markdown.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#markdown#Initialize()
21 | call SingleCompile#SetCompilerTemplate('markdown', 'markdown',
22 | \ 'text-to-HTML conversion tool', 'markdown',
23 | \ '-o $(FILE_TITLE)$.html',
24 | \ SingleCompile#GetDefaultOpenCommand() .
25 | \ ' "$(FILE_TITLE)$.html"')
26 | call SingleCompile#SetPriority('markdown', 'markdown', 50)
27 |
28 | call SingleCompile#SetCompilerTemplate('markdown', 'rdiscount',
29 | \ 'Discount Markdown Processor for Ruby', 'rdiscount',
30 | \ '$(FILE_NAME)$ >$(FILE_TITLE)$.html',
31 | \ SingleCompile#GetDefaultOpenCommand() .
32 | \ ' "$(FILE_TITLE)$.html"')
33 |
34 | call SingleCompile#SetCompilerTemplate('markdown', 'markdown_py',
35 | \ 'Discount Markdown Processor for Python', 'markdown_py',
36 | \ '-f $(FILE_TITLE)$.html -o html5 $(FILE_NAME)$',
37 | \ SingleCompile#GetDefaultOpenCommand() .
38 | \ ' "$(FILE_TITLE)$.html"')
39 | endfunction
40 |
41 | "vim703: cc=78
42 | "vim: et ts=4 tw=78 sw=4
43 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/matlab.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2013 PAN, Myautsai
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#matlab#Initialize()
21 | call SingleCompile#SetCompilerTemplate('matlab', 'matlab', 'MathWorks MATLAB',
22 | \'matlab', '-nodisplay -nosplash -r $(FILE_TITLE)$,exit', '')
23 | call SingleCompile#SetPriority('matlab', 'matlab', 50)
24 | call SingleCompile#SetCompilerTemplate('matlab', 'octave', 'GNU Octave',
25 | \'octave', '', '')
26 | call SingleCompile#SetPriority('matlab', 'octave', 60)
27 | endfunction
28 |
29 | "vim703: cc=78
30 | "vim: et ts=4 tw=78 sw=4
31 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/objc.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#objc#Initialize()
21 | call SingleCompile#SetCompilerTemplate('objc', 'clang',
22 | \ 'the Clang C and Objective-C compiler', 'clang',
23 | \ '-g -o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
24 | call SingleCompile#SetOutfile('objc', 'clang', g:SingleCompile_common_out_file)
25 | call SingleCompile#SetCompilerTemplate('objc', 'gcc',
26 | \'GNU Object-C Compiler', 'gcc', '-g -o $(FILE_TITLE)$',
27 | \g:SingleCompile_common_run_command)
28 | call SingleCompile#SetOutfile('objc', 'gcc', g:SingleCompile_common_out_file)
29 | call SingleCompile#SetPriority('objc', 'gcc', 80)
30 | endfunction
31 |
32 | "vim703: cc=78
33 | "vim: et ts=4 tw=78 sw=4
34 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/ocaml.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2015 Vishesh Yadav
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#ocaml#Initialize()
21 | call SingleCompile#SetCompilerTemplate('ocaml', 'ocaml', 'OCaml',
22 | \ 'ocamlc', '-o $(FILE_TITLE)$',
23 | \ g:SingleCompile_common_run_command)
24 | call SingleCompile#SetVimCompiler('ocaml', 'ocaml', 'ocamlc')
25 | endfunction
26 |
27 | "vim703: cc=78
28 | "vim: et ts=4 tw=78 sw=4
29 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/pascal.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#pascal#Initialize()
21 | call SingleCompile#SetCompilerTemplate('pascal', 'fpc',
22 | \'Free Pascal Compiler', 'fpc',
23 | \'', g:SingleCompile_common_run_command)
24 | call SingleCompile#SetOutfile('pascal', 'fpc',
25 | \g:SingleCompile_common_out_file)
26 | call SingleCompile#SetCompilerTemplate('pascal', 'gpc',
27 | \'GNU Pascal Compiler', 'gpc',
28 | \'-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
29 | call SingleCompile#SetOutfile('pascal', 'gpc',
30 | \g:SingleCompile_common_out_file)
31 | endfunction
32 |
33 | "vim703: cc=78
34 | "vim: et ts=4 tw=78 sw=4
35 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/perl.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#perl#Initialize()
21 | call SingleCompile#SetCompilerTemplate('perl', 'perl',
22 | \'Perl Interpreter', 'perl', '', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/php.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#php#Initialize()
21 | call SingleCompile#SetCompilerTemplate('php', 'php',
22 | \"PHP Command Line Interface 'CLI'", 'php', '-f', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/python.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#python#Initialize()
21 | call SingleCompile#SetCompilerTemplate('python', 'python', 'CPython (Usually the system default version. Can be Python 2 or 3.)',
22 | \'python', '', '')
23 | call SingleCompile#SetPriority('python', 'python', 50)
24 | call SingleCompile#SetCompilerTemplate('python', 'ironpython',
25 | \'IronPython', 'ipy', '', '')
26 | call SingleCompile#SetCompilerTemplate('python', 'jython', 'Jython',
27 | \'jython', '', '')
28 | call SingleCompile#SetCompilerTemplate('python', 'pypy', 'PyPy',
29 | \'pypy', '', '')
30 | call SingleCompile#SetPriority('python', 'pypy', 110)
31 | call SingleCompile#SetCompilerTemplate('python', 'python2',
32 | \'CPython 2', 'python2', '', '')
33 | call SingleCompile#SetPriority('python', 'python', 60)
34 | call SingleCompile#SetCompilerTemplate('python', 'python3',
35 | \'CPython 3', 'python3', '', '')
36 | call SingleCompile#SetPriority('python', 'python3', 120)
37 | endfunction
38 |
39 | "vim703: cc=78
40 | "vim: et ts=4 tw=78 sw=4
41 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/qml.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2014 Francisco Lopes
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#qml#Initialize()
21 | call SingleCompile#SetCompilerTemplate('qml', 'qmlviewer', 'qmlviewer',
22 | \ 'qmlviewer', '', '')
23 | call SingleCompile#SetCompilerTemplate('qml', 'qmlscene', 'qmlscene',
24 | \ 'qmlscene', '', '')
25 | endfunction
26 |
27 | "vim703: cc=78
28 | "vim: et ts=4 tw=78 sw=4
29 |
30 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/r.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#r#Initialize()
21 | call SingleCompile#SetCompilerTemplate('r', 'R', 'R', 'R',
22 | \'CMD BATCH', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/rst.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 | " Copyright © 2012 Martin Ueding
3 |
4 | " This file is part of SingleCompile.
5 |
6 | " SingleCompile is free software: you can redistribute it and/or modify
7 | " it under the terms of the GNU General Public License as published by
8 | " the Free Software Foundation, either version 3 of the License, or
9 | " (at your option) any later version.
10 |
11 | " SingleCompile is distributed in the hope that it will be useful,
12 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | " GNU General Public License for more details.
15 |
16 | " You should have received a copy of the GNU General Public License
17 | " along with SingleCompile. If not, see .
18 |
19 | " check doc/SingleCompile.txt for more information
20 |
21 | function! SingleCompile#templates#rst#Initialize()
22 | call SingleCompile#SetCompilerTemplate('rst', 'rst2html',
23 | \ 'reST-to-HTML conversion tool',
24 | \ 'rst2html',
25 | \ '$(FILE_NAME)$ $(FILE_TITLE)$.html',
26 | \ SingleCompile#GetDefaultOpenCommand() .
27 | \ ' "$(FILE_TITLE)$.html"')
28 | call SingleCompile#SetOutfile('rst', 'rst2html', '"$(FILE_TITLE)$.html"')
29 | call SingleCompile#SetPriority('rst', 'rst2html', 50)
30 | endfunction
31 |
32 | "vim703: cc=78
33 | "vim: et ts=4 tw=78 sw=4
34 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/ruby.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#ruby#Initialize()
21 | call SingleCompile#SetCompilerTemplate('ruby', 'ruby',
22 | \'Ruby Interpreter', 'ruby', '', '')
23 | call SingleCompile#SetPriority('ruby', 'ruby', 50)
24 |
25 | call SingleCompile#SetCompilerTemplate('ruby', 'jruby',
26 | \'Ruby JVM Interpreter (default Ruby version)', 'jruby', '', '')
27 | call SingleCompile#SetPriority('ruby', 'jruby', 55)
28 |
29 | call SingleCompile#SetCompilerTemplate('ruby', 'jruby1.8',
30 | \'Ruby JVM Interpreter (1.8)', 'jruby', '--1.8', '')
31 | call SingleCompile#SetPriority('ruby', 'jruby1.8', 80)
32 |
33 | call SingleCompile#SetCompilerTemplate('ruby', 'jruby1.9',
34 | \'Ruby JVM Interpreter (1.9)', 'jruby', '--1.9', '')
35 | call SingleCompile#SetPriority('ruby', 'jruby1.9', 60)
36 |
37 | call SingleCompile#SetCompilerTemplate('ruby', 'jruby2.0',
38 | \'Ruby JVM Interpreter (2.0)', 'jruby', '--2.0', '')
39 | call SingleCompile#SetPriority('ruby', 'jruby2.0', 70)
40 |
41 | endfunction
42 |
43 | "vim703: cc=78
44 | "vim: et ts=4 tw=78 sw=4
45 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/rust.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2013 Francisco Lopes
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#rust#Initialize()
21 | call SingleCompile#SetCompilerTemplate('rust', 'rustc', 'Rust',
22 | \ 'rustc', '-o $(FILE_TITLE)$', g:SingleCompile_common_run_command)
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/scala.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Reza Jelveh
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#scala#Initialize()
21 | call SingleCompile#SetCompilerTemplate('scala', 'scala',
22 | \'Scala Compiler', 'scala', '', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/sh.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2015 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#sh#Initialize()
21 | call SingleCompile#SetCompilerTemplate('sh', 'shell',
22 | \'Guess from shebang', 'sh', '', '')
23 | call SingleCompile#SetPriority('sh', 'shell', 10)
24 | call SingleCompile#SetPredo('sh', 'shell',
25 | \function('SingleCompile#PredoShell'))
26 | call SingleCompile#SetCompilerTemplate('sh', 'sh',
27 | \'Bourne Shell', 'sh', '', '')
28 | call SingleCompile#SetPriority('sh', 'sh', 80)
29 | call SingleCompile#SetCompilerTemplate('sh', 'bash',
30 | \'Bourne-Again Shell', 'bash', '', '')
31 | call SingleCompile#SetPriority('sh', 'bash', 90)
32 | call SingleCompile#SetCompilerTemplate('sh', 'ksh',
33 | \'Korn Shell', 'ksh', '', '')
34 | call SingleCompile#SetCompilerTemplate('sh', 'zsh',
35 | \'Z Shell', 'zsh', '', '')
36 | call SingleCompile#SetCompilerTemplate('sh', 'ash',
37 | \'Almquist Shell', 'ash', '', '')
38 | call SingleCompile#SetCompilerTemplate('sh', 'dash',
39 | \'Debian Almquist Shell', 'dash', '', '')
40 | endfunction
41 |
42 | "vim703: cc=78
43 | "vim: et ts=4 tw=78 sw=4
44 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/swift.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2018 lazywhite
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#swift#Initialize()
21 | call SingleCompile#SetCompilerTemplate('swift', 'swiftc', 'swiftc',
22 | \ 'swiftc', ' -o $(FILE_EXEC)$', g:SingleCompile_common_run_command)
23 | call SingleCompile#SetPriority('swift', 'swiftc', 20)
24 | endfunction
25 |
26 | "vim703: cc=78
27 | "vim: et ts=4 tw=78 sw=4
28 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/tcl.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#tcl#Initialize()
21 | call SingleCompile#SetCompilerTemplate('tcl', 'tclsh',
22 | \'Simple shell containing Tcl interpreter', 'tclsh',
23 | \'', '')
24 | call SingleCompile#SetVimCompiler('tcl', 'tclsh', 'tcl')
25 | endfunction
26 |
27 | "vim703: cc=78
28 | "vim: et ts=4 tw=78 sw=4
29 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/tcsh.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#tcsh#Initialize()
21 | call SingleCompile#SetCompilerTemplate('tcsh', 'tcsh',
22 | \'TENEX C Shell', 'tcsh', '', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/tex.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#tex#Initialize()
21 | call SingleCompile#SetCompilerTemplate('tex', 'pdflatex', 'pdfLaTeX',
22 | \'pdflatex', '-interaction=nonstopmode',
23 | \ SingleCompile#GetDefaultOpenCommand() .
24 | \ ' "$(FILE_TITLE)$.pdf"')
25 | call SingleCompile#SetPriority('tex', 'pdflatex', 50)
26 | call SingleCompile#SetCompilerTemplate('tex', 'latex', 'LaTeX',
27 | \'latex', '-interaction=nonstopmode',
28 | \ SingleCompile#GetDefaultOpenCommand() .
29 | \ ' "$(FILE_TITLE)$.dvi"')
30 | call SingleCompile#SetPriority('tex', 'latex', 80)
31 |
32 | " latexmk which automatically calls pdflatex, but runs it multiple times
33 | " to that all references are sorted out correctly.
34 | call SingleCompile#SetCompilerTemplate('tex', 'latexmk', 'latexmk',
35 | \ 'latexmk', '-pdf',
36 | \ SingleCompile#GetDefaultOpenCommand() .
37 | \ ' "$(FILE_TITLE)$.pdf"')
38 | call SingleCompile#SetPriority('tex', 'latexmk', 30)
39 | endfunction
40 |
41 | "vim703: cc=78
42 | "vim: et ts=4 tw=78 sw=4
43 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/vb.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#vb#Initialize()
21 | call SingleCompile#SetCompilerTemplate('vb', 'vbs',
22 | \'VB Script Interpreter', 'cscript', '', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/vim.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#vim#Initialize()
21 | call SingleCompile#SetCompilerTemplate('vim', 'vim', 'Vim',
22 | \'vim', '-u NONE -U NONE -e -N -n -S', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/xhtml.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#xhtml#Initialize()
21 | call SingleCompile#SetCompilerTemplate('xhtml', 'firefox',
22 | \'Mozilla Firefox', 'firefox', '', '')
23 | call SingleCompile#SetPriority('xhtml', 'firefox', 60)
24 | call SingleCompile#SetCompilerTemplate('xhtml', 'chrome',
25 | \'Google Chrome', 'google-chrome', '', '')
26 | call SingleCompile#SetPriority('xhtml', 'chrome', 70)
27 | call SingleCompile#SetCompilerTemplate('xhtml', 'chromium',
28 | \'Chromium', 'chromium', '', '')
29 | call SingleCompile#SetPriority('xhtml', 'chromium', 71)
30 | call SingleCompile#SetCompilerTemplate('xhtml', 'opera',
31 | \'Opera', 'opera', '', '')
32 | call SingleCompile#SetPriority('xhtml', 'opera', 80)
33 | call SingleCompile#SetCompilerTemplate('xhtml', 'konqueror',
34 | \'Konqueror', 'konqueror', '', '')
35 | call SingleCompile#SetCompilerTemplate('xhtml', 'arora',
36 | \'Arora', 'arora', '', '')
37 | call SingleCompile#SetCompilerTemplate('xhtml', 'epiphany',
38 | \'Epiphany', 'epiphany', '', '')
39 | if has('win32')
40 | call SingleCompile#SetCompilerTemplate('xhtml', 'ie',
41 | \'Microsoft Internet Explorer', 'iexplore', '', '',
42 | \function('SingleCompile#DetectIe'))
43 | call SingleCompile#SetPriority('xhtml', 'ie', 50)
44 | else
45 | call SingleCompile#SetCompilerTemplate('xhtml', 'ie',
46 | \'Microsoft Internet Explorer', 'iexplore', '', '')
47 | endif
48 | endfunction
49 |
50 | "vim703: cc=78
51 | "vim: et ts=4 tw=78 sw=4
52 |
--------------------------------------------------------------------------------
/autoload/SingleCompile/templates/zsh.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2012 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " check doc/SingleCompile.txt for more information
19 |
20 | function! SingleCompile#templates#zsh#Initialize()
21 | call SingleCompile#SetCompilerTemplate('zsh', 'zsh',
22 | \'Z Shell', 'zsh', '', '')
23 | endfunction
24 |
25 | "vim703: cc=78
26 | "vim: et ts=4 tw=78 sw=4
27 |
--------------------------------------------------------------------------------
/autoload/SingleCompileAsync.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2014 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " File: autoload/SingleCompileAsync.vim
19 | " Version: 2.12.0
20 | " check doc/SingleCompile.txt for more information
21 |
22 |
23 | let s:saved_cpo = &cpo
24 | set cpo&vim
25 |
26 | let s:cur_mode = ''
27 | let s:mode_dict = {}
28 |
29 | " python mode functions {{{1
30 |
31 | function! s:InitializePython() " {{{2
32 | " the Initialize function of python
33 |
34 | if !has('python')
35 | return 'Python interface is not available in this Vim.'
36 | endif
37 |
38 | let l:ret = ''
39 |
40 | python << EEOOFF
41 |
42 | try:
43 | import vim
44 | import shlex
45 | import subprocess
46 | import sys
47 | except:
48 | vim.command("let l:ret = 'Library import error.'")
49 | EEOOFF
50 |
51 | if !empty(l:ret)
52 | return l:ret
53 | endif
54 |
55 | python << EEOOFF
56 | if sys.version_info[0] < 2 or sys.version_info[1] < 6:
57 | vim.command("let l:ret = 'At least python 2.6 is required.'")
58 | EEOOFF
59 |
60 | if !empty(l:ret)
61 | return l:ret
62 | endif
63 |
64 | python << EEOOFF
65 |
66 | class SingleCompileAsync:
67 | sub_proc = None
68 | output = None
69 | # This value will be set below if we are on win32. For other systems,
70 | # leave this as None
71 | startupinfo = None
72 |
73 | # if we are on win32, we need to set STARTUPINFO before calling
74 | # subprocess.Popen() to make the console of the subprocess show minimized and
75 | # not actived.
76 | if sys.platform == 'win32':
77 |
78 | # set subprocess constants
79 | subprocess.STARTF_USESHOWWINDOW = 1
80 | subprocess.SW_HIDE = 0
81 |
82 | SingleCompileAsync.startupinfo = subprocess.STARTUPINFO()
83 | SingleCompileAsync.startupinfo.dwFlags = subprocess.STARTF_USESHOWWINDOW
84 | SingleCompileAsync.startupinfo.wShowWindow = subprocess.SW_HIDE
85 |
86 | EEOOFF
87 | endfunction
88 |
89 | function! s:IsRunningPython() " {{{2
90 | " The IsRunning function of python
91 |
92 | python << EEOOFF
93 |
94 | if SingleCompileAsync.sub_proc != None and \
95 | SingleCompileAsync.sub_proc.poll() == None:
96 | vim.command('let l:ret_val = 1')
97 | else:
98 | vim.command('let l:ret_val = 0')
99 |
100 | EEOOFF
101 |
102 | return l:ret_val
103 | endfunction
104 |
105 | function! s:RunPython(run_command) " {{{2
106 | " The Run function of python
107 |
108 | let l:ret_val = 0
109 |
110 | python << EEOOFF
111 |
112 | try:
113 | SingleCompileAsync.sub_proc = subprocess.Popen(
114 | shlex.split(vim.eval('a:run_command')),
115 | shell = False,
116 | universal_newlines = True,
117 | startupinfo = SingleCompileAsync.startupinfo,
118 | stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
119 |
120 | except:
121 | vim.command('let l:ret_val = 2')
122 |
123 | EEOOFF
124 |
125 | return l:ret_val
126 | endfunction
127 |
128 | function! s:TerminatePython() " {{{2
129 | " The Terminate function of python
130 |
131 | let l:ret_val = 0
132 |
133 | python << EEOOFF
134 |
135 | try:
136 | SingleCompileAsync.sub_proc.kill()
137 | except:
138 | vim.command('let l:ret_val = 2')
139 |
140 | EEOOFF
141 |
142 | return l:ret_val
143 | endfunction
144 |
145 | function! s:GetOutputPython() " {{{2
146 | " The GetOutput function of python
147 |
148 | python << EEOOFF
149 | try:
150 | SingleCompileAsync.tmpout = SingleCompileAsync.sub_proc.communicate()[0]
151 | except:
152 | pass
153 | else:
154 | SingleCompileAsync.output = SingleCompileAsync.tmpout
155 | del SingleCompileAsync.tmpout
156 |
157 | try:
158 | vim.command("let l:ret_val = '" +
159 | SingleCompileAsync.output.replace("'", "''") + "'")
160 | except:
161 | vim.command('let l:ret_val = 2')
162 |
163 | EEOOFF
164 |
165 | if type(l:ret_val) == type('')
166 | let l:ret_list = split(l:ret_val, "\n")
167 | unlet! l:ret_val
168 | let l:ret_val = l:ret_list
169 | endif
170 |
171 | return l:ret_val
172 | endfunction
173 |
174 | function! SingleCompileAsync#GetMode() " {{{1
175 | return s:cur_mode
176 | endfunction
177 |
178 | function! SingleCompileAsync#Initialize(mode) " {{{1
179 | " return 1 if failed to initialize the mode;
180 | " return 2 if mode has been set;
181 | " return 3 if the specific mode doesn't exist;
182 | " return 0 if succeed.
183 |
184 | " only set to the new mode if no mode is set before.
185 | if !empty(s:cur_mode)
186 | return 2
187 | endif
188 |
189 | " set function refs to dict
190 | if a:mode ==? 'auto'
191 | " autodetect for an appropriate mode
192 |
193 | for l:one_mode in ['python']
194 |
195 | let l:init_result = SingleCompileAsync#Initialize(l:one_mode)
196 | if type(l:init_result) == type(0) && l:init_result == 0
197 | return 0
198 | endif
199 | endfor
200 |
201 | return 0
202 |
203 | elseif a:mode ==? 'python'
204 | let s:mode_dict['Initialize'] = function('s:InitializePython')
205 | let s:mode_dict['IsRunning'] = function('s:IsRunningPython')
206 | let s:mode_dict['Run'] = function('s:RunPython')
207 | let s:mode_dict['Terminate'] = function('s:TerminatePython')
208 | let s:mode_dict['GetOutput'] = function('s:GetOutputPython')
209 | else
210 | return 3
211 | endif
212 |
213 | " call the initialization function
214 | let l:init_result = s:mode_dict['Initialize']()
215 |
216 | if type(l:init_result) == type('') ||
217 | \ (type(l:init_result) == type(0) && l:init_result != 0)
218 | return l:init_result
219 | endif
220 |
221 | let s:cur_mode = a:mode
222 |
223 | return 0
224 | endfunction
225 |
226 | function! SingleCompileAsync#IsRunning() " {{{1
227 | " check is there a process running in background.
228 | " Return 1 means there is a process running in background,
229 | " return 0 means there is no process running in background,
230 | " return -1 if mode hasn't been set,
231 | " return other values if failed to check whether the process is running.
232 |
233 | if empty(s:cur_mode)
234 | return 0
235 | endif
236 |
237 | return s:mode_dict['IsRunning']()
238 | endfunction
239 |
240 | function! SingleCompileAsync#Run(run_command) " {{{1
241 | " run a new command.
242 | " Return -1 if mode hasn't been set;
243 | " return 1 if a process is running in background;
244 | " return 0 means the command is run successfully;
245 | " return other values means the command is not run successfully.
246 |
247 | if empty(s:cur_mode)
248 | return -1
249 | endif
250 |
251 | if SingleCompileAsync#IsRunning() == 1
252 | return 1
253 | endif
254 |
255 | return s:mode_dict['Run'](a:run_command)
256 | endfunction
257 |
258 | function! SingleCompileAsync#Terminate() " {{{1
259 | " terminate current background process
260 |
261 | " Return -1 if mode hasn't been set;
262 | " return 1 if no process is running in background;
263 | " return 0 means terminating the process successfully;
264 | " return other values means failed to terminate.
265 |
266 | if empty(s:cur_mode)
267 | return -1
268 | endif
269 |
270 | if SingleCompileAsync#IsRunning() == 0
271 | return 1
272 | endif
273 |
274 | return s:mode_dict['Terminate']()
275 | endfunction
276 |
277 | function! SingleCompileAsync#GetOutput() " {{{1
278 | " get the output of the process.
279 | " Return -1 if mode hasn't been set;
280 | " return 1 if a process is running in background;
281 | " return other integer values if failed to get the output;
282 | " return a list if the output is successfully gained.
283 |
284 | if empty(s:cur_mode)
285 | return -1
286 | endif
287 |
288 | if SingleCompileAsync#IsRunning() == 1
289 | return 1
290 | endif
291 |
292 | return s:mode_dict['GetOutput']()
293 | endfunction
294 | " }}}
295 |
296 | let &cpo = s:saved_cpo
297 | unlet! s:saved_cpo
298 |
299 | " vim703: cc=78
300 | " vim: fdm=marker et ts=4 tw=78 sw=4 fdc=3
301 |
--------------------------------------------------------------------------------
/doc/SingleCompile.txt:
--------------------------------------------------------------------------------
1 | *SingleCompile.txt*
2 |
3 | File: SingleCompile.txt
4 | Version: 2.12.0
5 | Original Author and Current Maintainer: Hong Xu
6 | Last Change: 11 June 2013
7 | Homepage: http://www.topbug.net/SingleCompile
8 | GitHub repo: https://github.com/xuhdev/SingleCompile
9 | Description: Make it more convenient to compile or run a single source file.
10 | License:
11 | Copyright (C) 2010-2014 Hong Xu
12 |
13 | This file is part of SingleCompile.
14 |
15 | SingleCompile is free software: you can redistribute it and/or modify
16 | it under the terms of the GNU General Public License as published by
17 | the Free Software Foundation, either version 3 of the License, or
18 | (at your option) any later version.
19 |
20 | SingleCompile is distributed in the hope that it will be useful,
21 | but WITHOUT ANY WARRANTY; without even the implied warranty of
22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 | GNU General Public License for more details.
24 |
25 | You should have received a copy of the GNU General Public License
26 | along with SingleCompile. If not, see .
27 |
28 | CONTENTS~
29 | *SingleCompile-contents*
30 | ----------------------------------------------------------------------------
31 | 1. Overview |SingleCompile-overview|
32 | 2. Installation |SingleCompile-installation|
33 | 3. Commands |SingleCompile-commands|
34 | 4. Settings |SingleCompile-settings|
35 | 5. Key-mappings |SingleCompile-key-mapping|
36 | 6. Compiler template |SingleCompile-compiler-template|
37 | 7. Supporting plugins |SingleCompile-supporting-plugins|
38 | 8. Advanced |SingleCompile-advanced|
39 | 9. Credits |SingleCompile-credits|
40 | 10. Todo |SingleCompile-todo|
41 |
42 |
43 | OVERVIEW~
44 | *SingleCompile-overview*
45 | ----------------------------------------------------------------------------
46 | This plugin is aimed at making it more convenient to compile or run a single
47 | source file without leaving vim.
48 |
49 | A short introduction is available here:
50 | http://www.topbug.net/blog/2012/03/07/use-singlecompile-to-compile-and-run-a-single-source-file-easily-in-vim/
51 |
52 | Consider this situation: you have just written a small c source file for a
53 | small test, but you have to write a Makefile to compile it or exit vim to
54 | compile it or compile it using "!gcc" without quickfix feature because vim's
55 | make command only use the "make" command? This plugin will help you out.
56 |
57 | Add these key-mappings to your vimrc:
58 | >
59 | nmap :SCCompile
60 | nmap :SCCompileRun
61 | <
62 | Note that the two lines here should not have any trailing space. If your file
63 | type is supported, then press F9 to compile your source file, and press F10 to
64 | compile and run your source file. If there is a compilation error, and the
65 | |quickfix| feature is enabled, then you could use |:cope| command to see the
66 | error list. You may also use ":SCChooseCompiler" command to choose a compiler
67 | if you have more than one kind of compiler available on you system.
68 | ":SCViewResult" will show you the last run result.
69 |
70 |
71 | Features:
72 | 1. Compile or run the source file quickly using |quickfix| feature and
73 | |compiler| feature of vim;
74 | 2. Compilers and interpreters auto detecting;
75 | 3. Fast switch between several installed compilers or interpreters;
76 | 4. Multi-language support;
77 | 5. Custom your own compiler/interpreter template;
78 | 6. View the result of last run command at any time(requires "tee" command);
79 | 7. Run the compiled program asynchronously and view the result at any time
80 | (see |:SCCompileRunAsync|).
81 |
82 |
83 | The complete list of built-in compiler templates is at
84 | |SingleCompile-built-in-compiler|.
85 |
86 | You can add your compiler or interpreter support if the compiler or
87 | interpreter you want is not in the list. See details in the help file.
88 |
89 | There are some supporting code in this plugin for Marc Weber's
90 | vim-addon-actions:
91 | http://github.com/MarcWeber/vim-addon-actions
92 |
93 | If you find any bug, please report it to hong@topbug.net or submit it on
94 | the issue tracker:
95 | https://bitbucket.org/xuhdev/singlecompile/issues
96 |
97 | If you've written some templates for some compilers or interpreters which are
98 | not included as built-in template, and you think they are useful for other
99 | people, you could send me an email to inform me, and I'll put them in the
100 | built-in templates.
101 |
102 |
103 | Git repository on github.com: https://github.com/xuhdev/SingleCompile
104 | Mercurial repository on bitbucket.org: https://bitbucket.org/xuhdev/singlecompile
105 |
106 | Follow xuhdev on twitter if you are interested in my development:
107 | http://twitter.com/xuhdev
108 |
109 |
110 | INSTALLATION~
111 | *SingleCompile-installation*
112 | ----------------------------------------------------------------------------
113 | Download the SingleCompile.zip file and extract it to your vim runtime
114 | directory(~/.vim on linux and $VIM_INSTALLATION_FOLDER\vimfiles on windows),
115 | you'd better then use ":helptags" command to generate the help tag(for example
116 | use ":helptags ~/.vim/doc" on UNIX/Linux).
117 |
118 |
119 | COMMANDS~
120 | *SingleCompile-commands*
121 | ----------------------------------------------------------------------------
122 |
123 | *:SCCompile*
124 | Command:
125 | :SCCompile
126 | If you are editing a source file of a compiling language such as C, Java, this
127 | command will compile the file which you are editing now. If you are editing a
128 | source file of a interpreted language such as python language, this command
129 | will run the file which you are editing. See |SingleCompile-compiler-template|
130 | about the compilation command.
131 |
132 | You can add some arguments after the command. For example, you want to compile
133 | your c source file with "-g -o %<" flag instead of the "-o %<" flag defined in
134 | the language template(see |SingleCompile-compiler-template|) for just this
135 | time, just use the following command:
136 | >
137 | :SCCompile -g -o %<
138 | <
139 | "%<" means the current file name without extension.
140 | Also see |:SCCompileAF|.
141 |
142 | *:SingleCompile*
143 | Command:
144 | :SingleCompile
145 | Same as |:SCCompile|, only for backward compatibility use. Not recommended to
146 | use any more.
147 |
148 | *:SCCompileAF*
149 | Command:
150 | :SCCompileAF
151 | This command is also used for compiling your source file, but it allows you to
152 | append some additional compilation or interpretion flags other than the flags
153 | already defined in the compiler and interpreter template. The "AF" is short
154 | for "Addtional Flags". For example, GCC compiler for C has already been
155 | defined some flags: "-o "%<"". But sometimes you also want to use "-O2" flag
156 | to optimize your code, then you can use the following commands to compile your
157 | file:
158 | >
159 | :SCCompileAF -O2
160 | <
161 | :SCCompile can also be used with some arguments, but there are some
162 | differences. :SCCompileAF use your arguments as "additional" compilation
163 | flags, which means the flags defined in the original templates are also valid,
164 | while :SCCompile use you arguments as compilation flags only, which means the
165 | flags defined in the original templates are not used. For example, the
166 | templates of GCC defined "flags" as '-o "%<"', "%<" stands for the output file
167 | name. ":SCCompile -O2" will use "gcc -O2 some_file.c" to compile your source
168 | file, while ":SCCompileAF -O2" will use "gcc -o some_file -O2 some_file.c" to
169 | compile your source file.
170 |
171 | *:SCCompileRun*
172 | Command:
173 | :SCCompileRun
174 | If you are editing a source file of a compiling language such as C, Java, this
175 | command will compile the file which you are editing now and run the
176 | executable; if you are editing a source file of a interpreted language such as
177 | python, ruby, this command will run the source file you are editing. That
178 | means, there is nothing different between |:SCCompile| and |:SCCompileRun| for an
179 | interpreted language source file.
180 |
181 | You can also add some arguments after SCCompileRun command, the meaning of
182 | arguments is the same as SingleCompile command above. Here is an example:
183 | >
184 | :SCCompileRun -g -o %<
185 | <
186 |
187 | When the program you've just compiled (or the script you've just written)
188 | runs, vim will hang up to wait for the program to terminate. If you do not
189 | want vim to hang up when running the program, use |:SCCompileRunAsync|
190 | instead. See |:SCCompileRunAsync| for further information.
191 |
192 | *:SingleCompileRun*
193 | Command:
194 | :SingleCompileRun
195 | Same as |:SCCompileRun|, only for backward compatibility use. Not recommended
196 | to use any more.
197 |
198 | *:SCCompileRunAF*
199 | Command:
200 | :SCCompileRunAF
201 | Same as |:SCCompileAF|, but also run the binary file after compilation. For
202 | example, the following command is going to compile your source file with an
203 | additional "-O2" flag and run the output binary file:
204 | >
205 | :SCCompileRunAF -O2
206 | <
207 |
208 | *:SCCompileRunAsync*
209 | Command:
210 | :SCCompileRunAsync
211 | Same as |:SCCompileRun|, but compile the source and run asynchronously. That
212 | is to say, after the program starts to run, you are still able to edit the
213 | source file, because vim does not hang up waiting for the program to
214 | terminate. The result of the run could be viewed by |:SCViewResultAsync|
215 | command. This command might not be available on your vim, see
216 | |SingleCompile-asyncrunmode| for more information. This command is useful when
217 | the program takes a long time to run or you are developing a GUI program. Also
218 | see |:SCViewResultAsync|, |:SCTerminateAsync| and |:SCIsRunningAsync|.
219 |
220 | *:SCCompileRunAsyncAF*
221 | Command:
222 | :SCCompileRunAsyncAF
223 | Same as |:SCCompileRunAF|, but compile the source and run asynchronously. The
224 | result of the run could be viewed by |:SCViewResultAsync| command. This
225 | command is disabled by default, to enable it, see
226 | |SingleCompile-asyncrunmode|. Also see |:SCCompileRunAsync|.
227 |
228 | *:SCChooseCompiler*
229 | Command:
230 | :SCChooseCompiler
231 | Choose a compiler to use. This command will display a list of compilers for
232 | you to choose one. If you want to set a default compiler in your vimrc, please
233 | use the function SingleCompile#ChooseCompiler. See
234 | |SingleCompile-use-built-in-template|.
235 |
236 | *:SCChooseInterpreter*
237 | Command:
238 | :SCChooseInterpreter
239 | Same as |:SCChooseCompiler|.
240 |
241 | *:SCIsRunningAsync*
242 | Command:
243 | :SCIsRunningAsync
244 | Check whether the asynchronously run process is still running. Also see
245 | |:SCCompileRunAsync|.
246 |
247 | *:SCTerminateAsync*
248 | Command:
249 | :SCTerminateAsync
250 | Terminate the process which is running asynchronously if exists. Also see
251 | |:SCCompileRunAsync|.
252 |
253 | *:SCViewResult*
254 | Command:
255 | :SCViewResult
256 | View the result of the last run command. Only valid when "tee" command is
257 | available. "tee" is usually available on a UNIX system. If you are under
258 | Windows, install cygwin or visit the following link to download a "tee"
259 | command for Windows:
260 |
261 | http://gnuwin32.sourceforge.net/packages/coreutils.htm
262 |
263 | NOTE: When you disable "tee" by setting |SingleCompile_usetee| to 0, you
264 | will disable this feature.
265 |
266 | *:SCViewResultAsync*
267 | Command:
268 | :SCViewResultAsync
269 | Same as |:SCViewResult|, but the result displayed is the result of the process
270 | run by |:SCCompileRunAsync| or |:SCCompileRunAsyncAF|.
271 |
272 |
273 | SETTINGS~
274 | *SingleCompile-settings*
275 | ----------------------------------------------------------------------------
276 |
277 | *g:SingleCompile_alwayscompile*
278 | If g:SingleCompile_alwayscompile is set to 0, when using |:SCCompileRun|
279 | command, SingleCompile may run the output of the compilation directly if the
280 | modification time of the source file is earlier than the output file. If you
281 | want to enable this feature, add the following line to your vimrc:
282 | >
283 | let g:SingleCompile_alwayscompile = 0
284 | <
285 | The default value of g:SingleCompile_alwayscompile is 1.
286 |
287 | *g:SingleCompile_asyncrunmode*
288 | This option specifies the asynchronous mode for |:SCCompileRunAsync| and
289 | |:SCCompileRunAsyncAF|. The default value is "auto", which means SingleCompile
290 | will automatically detect whether you are able to enable async run mode and
291 | select one mode for you. Use the following line, replace modename with the
292 | mode you want to change mode:
293 | >
294 | let g:SingleCompile_asyncrunmode = 'modename'
295 | <
296 |
297 | Here is a list of available mode:
298 |
299 | auto This is the default value. SingleCompile automatically selects one
300 | mode for you.
301 | >
302 | let g:SingleCompile_asyncrunmode = 'auto'
303 | <
304 |
305 | none Disable asynchronous mode, which means |:SCCompileRunAsync| and
306 | |:SCCompileRunAsyncAF| and related commands are disabled.
307 | >
308 | let g:SingleCompile_asyncrunmode = 'none'
309 | <
310 |
311 | python Use python interface when running asynchronously. Required vim
312 | compiled with python interface 2.6+. See |+python|.
313 | >
314 | let g:SingleCompile_asyncrunmode = 'python'
315 | <
316 |
317 |
318 | *g:SingleCompile_autowrite*
319 | If you don't want to save your file automatically when you use "SingleCompile"
320 | command or "SingleCompileRun" command, add the following line to your vimrc:
321 | >
322 | let g:SingleCompile_autowrite = 0
323 | <
324 | NOTE: If you let g:SingleCompile_usequickfix=1, this option will take no
325 | effect, the running result will depend on the vim's option 'autowrite'. See
326 | 'autowrite' for more information.
327 |
328 | *SingleCompile-menumode*
329 | *g:SingleCompile_menumode*
330 | If you don't want the menus of SingleCompile to show, copy the following line
331 | to your vimrc:
332 | >
333 | let g:SingleCompile_menumode = 0
334 | <
335 | If you want the menus of SingleCompile to show as a sub menu of Plugin, copy
336 | the following line to your vimrc:
337 | >
338 | let g:SingleCompile_menumode = 1
339 | <
340 | If you want the menus of SingleCompile to show in the menu bar, copy the
341 | following line to your vimrc:
342 | >
343 | let g:SingleCompile_menumode = 2
344 | <
345 | The default value is 1.
346 |
347 | *SingleCompile-quickfixwindowposition*
348 | *g:SingleCompile_quickfixwindowposition*
349 | If |g:SingleCompile_showquickfixiferror| is set to 1,
350 | |g:SingleCompile_quickfixwindowposition| defines the position where quickfix
351 | window shows up. The default value is "botright", but you can change this
352 | value by add the following line to your vimrc file:
353 | >
354 | let g:SingleCompile_quickfixwindowposition = 'some_position'
355 | <
356 | Accepted values are "aboveleft", "topleft", "botright", "belowright",
357 | "vertical", "leftabove", etc. SingleCompile will simply prepend
358 | |g:SingleCompile_quickfixwindowposition| to 'cope' and 'cw' commands. See
359 | |opening-window| and 'cope' for more details.
360 |
361 | *SingleCompile-resultsize*
362 | *g:SingleCompile_resultsize*
363 | g:SingleCompile_resultsize is the height/width of the result displaying window
364 | triggered by |:SCViewResult| command. To set the value, add the following line
365 | to your vimrc file:
366 | >
367 | let g:SingleCompile_resultsize = a_number
368 | <
369 | Replace a_number to any number you want, such as "10", "4". The default value
370 | of g:SingleCompile_resultsize is 5.
371 |
372 | *SingleCompile-split*
373 | *g:SingleCompile_split*
374 | g:SingleCompile_split is the command used to open the result window triggered
375 | by |:SCViewResult| command. To set the value, add the following line to your
376 | vimrc file:
377 | >
378 | let g:SingleCompile_split = 'vsplit'
379 | <
380 | or
381 | >
382 | let g:SingleCompile_split = 'tabe'
383 | <
384 | It is also possible to select between vertical or horizontal split depending
385 | on the current window width. To achieve this it is necessary to update the
386 | plugin options on the mapping that calls |:SCCompileRun|. This can be done in
387 | a new mapping, or replacing the default mapping to |:SCCompileRun|, :
388 | >
389 | nnoremap :call SingleCompileSplit() \| SCCompileRun
390 | function! SingleCompileSplit()
391 | if winwidth(0) > 160
392 | let g:SingleCompile_split = "vsplit"
393 | let g:SingleCompile_resultsize = winwidth(0)/2
394 | else
395 | let g:SingleCompile_split = "split"
396 | let g:SingleCompile_resultsize = 15
397 | endif
398 | endfunction
399 | <
400 | The default value is `'split'`.
401 |
402 | *SingleCompile-showquickfixiferror*
403 | *g:SingleCompile_showquickfixiferror*
404 | If |quickfix| is enabled and used, and you want the quickfix window to show
405 | automatically if there is a compilation error, then add the following line to
406 | your vimrc file:
407 | >
408 | let g:SingleCompile_showquickfixiferror = 1
409 | <
410 | The default value of g:SingleCompile_showquickfixiferror is 0. You may want to
411 | use this option with |SingleCompile-silentcompileifshowquickfix|. Note that
412 | this option will be ignored if you are using interpreting languages on
413 | Windows, such as Python, Ruby. Also see |SingleCompile-showquickfixifwarning|.
414 |
415 | *SingleCompile-showquickfixifwarning*
416 | *g:SingleCompile_showquickfixifwarning*
417 | If |quickfix| is enabled and used, and you want the quickfix window to show
418 | automatically if there is a compilation warning. This setting is only valid
419 | when |g:SingleCompile_showquickfixiferror| is set to 1.
420 | >
421 | let g:SingleCompile_showquickfixifwarning = 0
422 | <
423 | The default value of g:SingleCompile_showquickfixifwarning is as same as
424 | g:SingleCompile_showquickfixiferror. You don't want miss a warning, will you?
425 |
426 | *SingleCompile-showresultafterrun*
427 | *g:SingleCompile_showresultafterrun*
428 | If "tee" command is available on your system, copy the following line to your
429 | vimrc file will make vim show the result of the run automatically after you
430 | run the program:
431 | >
432 | let g:SingleCompile_showresultafterrun = 1
433 | <
434 | This option is only valid for synchronous run. That is to say, asynchronous
435 | run is not affected by this option. The default value of
436 | g:SingleCompile_showresultafterrun is 0. Also see |:SCViewResult|.
437 |
438 | *SingleCompile-silentcompileifshowquickfix*
439 | *g:SingleCompile_silentcompileifshowquickfix*
440 | Avoid the additional hit of enter when using quickfix feature to compile.
441 | This is done by dismisses the output of the compilation (:silent make). This
442 | feature is only valid when showquickfixiferror is enabled. This feature won't
443 | enable on terminal because of the problem of screen refresh.
444 | >
445 | let g:SingleCompile_silentcompileifshowquickfix = 1
446 | <
447 | This is not default enabled for compatible.
448 |
449 | *SingleCompile-usedialog*
450 | *g:SingleCompile_usedialog*
451 | If you want SingleCompile to show message in a dialog, add the
452 | following line to your vimrc:
453 | >
454 | let g:SingleCompile_usedialog = 1
455 | <
456 | This setting will take no effect if your vim is not compiled with
457 | '+dialog_con' and '+dialog_gui'.
458 |
459 | *SingleCompile-usetee*
460 | *g:SingleCompile_usetee*
461 | When set to 0, the use of tee is disabled when running your compiled program.
462 | This would make the flush of the display of the output of your program perform
463 | normally but you will lose the feature of |SCViewResult|.
464 | >
465 | let g:SingleCompile_usetee = 0
466 | <
467 | The default value of g:SingleCompile_usetee is 1.
468 |
469 | *SingleCompile-usequickfix*
470 | *g:SingleCompile_usequickfix*
471 | If you don't want SingleCompile to use quickfix feature, add the following
472 | line to your vimrc:
473 | >
474 | let g:SingleCompile_usequickfix = 0
475 | <
476 |
477 |
478 | KEY-MAPPING~
479 | *SingleCompile-key-mapping*
480 | ----------------------------------------------------------------------------
481 | I recommend you to copy the following two lines about key mapping to your
482 | vimrc:
483 | >
484 | nmap :SingleCompile
485 | nmap :SingleCompileRun
486 | <
487 | Then you can press F9 to compile, and F10 to compile and run.
488 |
489 |
490 | COMPILER-TEMPLATE~
491 | *SingleCompile-compiler-template*
492 | ----------------------------------------------------------------------------
493 | *SingleCompile-use-built-in-template*
494 | *SingleCompile#ChooseCompiler*
495 | To use a built-in compiler, add the following line to your vimrc file:
496 | >
497 | call SingleCompile#ChooseCompiler('filetype', 'compiler')
498 | <
499 | "filetype" is the type of file which your compiler is for, such as "c",
500 | "python", and "compiler" is the short name of the compiler. "filetype" is a
501 | terminology of vim. See |filetype| if you don't know what is "filetype". For
502 | example:
503 | >
504 | call SingleCompile#ChooseCompiler('c', 'icc')
505 | call SingleCompile#ChooseCompiler('fortran', 'gfortran')
506 | <
507 | This will choose icc (short for Intel C++ Compiler) as your current C compiler
508 | and choose gfortran (GNU Fortran Compiler) as your current Fortran compiler.
509 | For the list of built-in supported compilers, see
510 | |SingleCompile-built-in-compilers|.
511 |
512 | If you don't choose a compiler by yourself, SingleCompile will automatically
513 | choose one for you according to the compiler's priority value (See
514 | |SingleCompile-priority|).
515 |
516 | You can also extend the compiler template if the compiler you want is not in
517 | the built-in supporting list. SingleCompile#ChooseCompiler could also be used
518 | to choose a user defined compiler. Check |SingleCompile-add-your-compiler| for
519 | more information.
520 |
521 | *SingleCompile-add-your-compiler*
522 | *SingleCompile#SetCompilerTemplate*
523 | To add a new compiler support by yourself, there are two ways:
524 | 1. (Recommended) Add the following lines to your vimrc file:
525 | >
526 | call SingleCompile#SetCompilerTemplate('filetype', 'compiler', 'compiler_name', 'command', 'flag', 'run_command')
527 | call SingleCompile#SetOutfile('filetype', 'compiler', 'out_file')
528 | call SingleCompile#ChooseCompiler('filetype', 'compiler')
529 | <
530 | Now Let's see the first line. "filetype" is the source file type, such as "c",
531 | "cpp", "python", etc. It is a terminology of vim. See |filetype| if you don't
532 | know what is "filetype". For compiling languages such as C, Java, Fortran,
533 | "compiler" is the short name for the compiler, such as "gcc", "icc"; "command"
534 | is the command of compiling, such as "gcc", "g++"; "flag" is the flags of
535 | compiling, such as "-O2"; "run_command" is the command of running, such as
536 | "./a.out". For interpreted languages such as Python, Ruby, "command" is the
537 | command of interpreting, such as "python"; "flag" is the flags of
538 | interpreting; and "run_command" MUST be set to be empty.
539 |
540 | For the second line, "filetype" and "compiler" has the same meanings with the
541 | first line. "out_file" is the output file of the compilation, such as
542 | "./a.out", "./a.exe", etc. This line could be omitted if you don't want
543 | SingleCompile to check whether compilation is needed. See
544 | |SingleCompile-alwayscompile| for more information.
545 |
546 | There are four special variable that you can use:
547 | '$(FILE_NAME)$' returns the "%".
548 | '$(FILE_PATH)$' returns "%:p".
549 | '$(FILE_TITLE)$' returns "%:r".
550 | '$(FILE_EXEC)$' returns "%:r.exe" on windows and "%:r" on unix.
551 | '$(FILE_RUN)$' returns "%:r.exe" on windows and "./%:r" on unix.
552 | Also see |%|.
553 |
554 | The first two lines are to set the template of your compiler, while the third
555 | line is to tell SingleCompile to use your compiler. If the second line is
556 | omitted, SingleCompile will detect the compilers available on your system
557 | automatically, and use the first detected one.
558 |
559 | Here are some examples modified from built-in compiler templates:
560 | >
561 | " set the most common used run command
562 | " you may also use $(FILE_RUN)$ as an alternative.
563 | if has('win32') || has('win64') || has('os2')
564 | let l:common_run_command = '$(FILE_TITLE)$'
565 | let l:common_out_file = '$(FILE_TITLE)$.exe'
566 | else
567 | let l:common_run_command = './$(FILE_TITLE)$'
568 | let l:common_out_file = '$(FILE_TITLE)$'
569 | endif
570 |
571 | " c
572 | call SingleCompile#SetCompilerTemplate('c', 'gcc', 'GNU C Compiler',
573 | \'gcc', '-o $(FILE_TITLE)$', l:common_run_command)
574 | call SingleCompile#SetOutfile('c', 'gcc', l:common_out_file)
575 | call SingleCompile#SetCompilerTemplate('c', 'icc',
576 | \'Intel C++ Compiler', 'icc', '-o $(FILE_TITLE)$',
577 | \l:common_run_command)
578 | call SingleCompile#SetOutfile('c', 'icc', l:common_out_file)
579 |
580 | call SingleCompile#ChooseCompiler('c', 'gcc')
581 |
582 | " fortran
583 | call SingleCompile#SetCompilerTemplate('fortran', 'g77',
584 | \'GNU Fortran 77 Compiler', 'g77', '-o $(FILE_TITLE)$',
585 | \l:common_run_command)
586 | call SingleCompile#SetOutfile('fortran', 'g77', l:common_out_file)
587 | call SingleCompile#SetCompilerTemplate('fortran', 'ifort',
588 | \'Intel Fortran Compiler', 'ifort', '-o $(FILE_TITLE)$',
589 | \l:common_run_command)
590 | call SingleCompile#SetOutfile('fortran', 'ifort', l:common_out_file)
591 |
592 | call SingleCompile#ChooseCompiler('fortran', 'g77')
593 |
594 | " python
595 | call SingleCompile#SetCompilerTemplate('python', 'python', 'CPython',
596 | \'python', '', '')
597 | call SingleCompile#SetCompilerTemplate('python', 'jython', 'Jython',
598 | \'jython', '', '')
599 |
600 | call SingleCompile#ChooseCompiler('python', 'jython')
601 | <
602 |
603 | 2. (Deprecated, only kept for backward compatibility use)
604 | If you use this method to add a language template, many features of
605 | SingleCompile will be unavailable. For example, ":SCChooseCompiler" command
606 | will not be available. So I don't recommend you to use this method, and this
607 | method is kept ONLY for backward compatibility.
608 |
609 | Add the following lines to your vimrc file:
610 | >
611 | call SingleCompile#SetTemplate('filetype', 'command', 'stringA')
612 | call SingleCompile#SetTemplate('filetype', 'flags', 'stringB')
613 | call SingleCompile#SetTemplate('filetype', 'run', 'stringC')
614 | <
615 | For compiling languages such as C, Java, stringA is the command of compiling,
616 | stringB is the flags of compiling, stringC is the command of running; For
617 | interpreted languages such as Python, Ruby, stringA is the command of
618 | interpreting, stringB is the flags of interpreting, stringC MUST be set to
619 | be empty.
620 |
621 | Here are some examples:
622 | >
623 | " java
624 | call SingleCompile#SetTemplate('java', 'command', 'javac')
625 | call SingleCompile#SetTemplate('java', 'flags', '')
626 | call SingleCompile#SetTemplate('java', 'run', 'java %<')
627 |
628 | " python
629 | call SingleCompile#SetTemplate('python', 'command', 'python')
630 | call SingleCompile#SetTemplate('python', 'flags', '')
631 | call SingleCompile#SetTemplate('python', 'run', '')
632 |
633 | " latex
634 | call SingleCompile#SetTemplate('tex', 'command', 'latex')
635 | call SingleCompile#SetTemplate('tex', 'flags', '')
636 | if has('unix')
637 | call SingleCompile#SetTemplate('tex', 'run', 'xdvi %<.dvi')
638 | elseif has('win32')
639 | call SingleCompile#SetTemplate('tex', 'run', 'dviout %<.dvi')
640 | endif
641 | <
642 | You can also use this method to modify the templates of a built-in supported
643 | language. For example, you can change 'dviout' to 'yap' in the example above
644 | to modify the built-in latex language template.
645 |
646 | Advanced: If you don't want to override the template if there is an existing
647 | one, but use the new template if there is no corresponding template existing,
648 | for example, you want to set the "command" of java language to javac if no
649 | command is set for java, but do nothing if the command of java is not set, use
650 | the following:
651 | >
652 | call SingleCompile#SetTemplate('java', 'command', 'javac', 1)
653 | <
654 | In this way, if the command of java is already set, this sentence will do
655 | nothing. On the contrary, if the command of java is not set, it will set the
656 | compilation command of java to "javac".
657 |
658 | *SingleCompile-built-in-compiler*
659 | The following compilers have built-in support in this plugin (For some
660 | compilers/interpreters, you need to set the environment varibles correctly to
661 | make them available for SingleCompile):
662 |
663 | Ada:
664 | gnat (GNAT)
665 |
666 | bash:
667 | bash (Bourne-Again Shell)
668 |
669 | C:
670 | bcc (Borland C++ Builder), Windows only
671 | cc (UNIX C Compiler), UNIX only
672 | ch (SoftIntegration Ch)
673 | clang (the Clang C and Objective-C compiler)
674 | gcc (GNU C Compiler)
675 | icc (Intel C++ Compiler)
676 | lcc (Little C Compiler)
677 | msvc (Microsoft Visual C++ (In PATH)), Windows only
678 | msvc80 (Microsoft Visual C++ 2005), Windows only
679 | msvc90 (Microsoft Visual C++ 2008), Windows only
680 | msvc100 (Microsoft Visual C++ 2010), Windows only
681 | msvc110 (Microsoft Visual C++ 2012), Windows only
682 | open-watcom (Open Watcom C/C++32 Compiler)
683 | open64 (Open64 C Compiler), UNIX only
684 | pcc (Portable C Compiler)
685 | sol-studio (Sun C Compiler(Sun Solaris Studio)), UNIX only
686 | tcc (Tiny C Compiler)
687 | tcc-run (Tiny C Compiler with "-run" Flag)
688 |
689 | C++:
690 | bcc (Borland C++ Builder), Windows Only
691 | ch (SoftIntegration Ch)
692 | clang (the Clang C and Objective-C compiler)
693 | g++ (GNU C++ Compiler)
694 | icc (Intel C++ Compiler)
695 | msvc (Microsoft Visual C++ (In PATH)), Windows only
696 | msvc80 (Microsoft Visual C++ 2005), Windows only
697 | msvc90 (Microsoft Visual C++ 2008), Windows only
698 | msvc100 (Microsoft Visual C++ 2010), Windows only
699 | msvc110 (Microsoft Visual C++ 2012), Windows only
700 | open-watcom (Open Watcom C/C++32 Compiler)
701 | open64 (Open64 C++ Compiler), UNIX only
702 | sol-studio (Sun C++ Compiler(Sun Solaris Studio)), UNIX only
703 |
704 | C#:
705 | msvcs(Microsoft Visual C#), Windows Only
706 | mono (Mono C# compiler)
707 |
708 | cmake:
709 | cmake (cmake)
710 |
711 | CoffeeScript:
712 | coffee (CoffeeScript)
713 |
714 | csh:
715 | csh (C Shell)
716 | tcsh (TENEX C Shell)
717 |
718 | D:
719 | dmd (DMD Compiler)
720 |
721 | dos batch:
722 | dosbatch (DOS Batch)
723 |
724 | erlang:
725 | escript (Erlang Scripting Support)
726 |
727 | Elixir:
728 | elixir (Elixir)
729 |
730 | Fortran:
731 | ftn95 (Silverfrost FTN95), Windows only
732 | g77 (GNU Fortran 77 Compiler)
733 | g95 (G95)
734 | gfortran (GNU Fortran Compiler)
735 | ifort (Intel Fortran Compiler)
736 | open-watcom (Open Watcom Fortran 77/32 Compiler)
737 | open64-f90 (Open64 Fortran 90 Compiler), UNIX only
738 | open64-f95 (Open64 Fortran 95 Compiler), UNIX only
739 | sol-studio-f77 (Sun Fortran 77 Compiler(Sun Solaris Studio)), UNIX only
740 | sol-studio-f90 (Sun Fortran 90 Compiler(Sun Solaris Studio)), UNIX only
741 | sol-studio-f95 (Sun Fortran 95 Compiler(Sun Solaris Studio)), UNIX only
742 |
743 | Go:
744 | go (Go)
745 |
746 | Haskell:
747 | ghc (Glasgow Haskell Compiler)
748 | runhaskell (runhaskell)
749 | stack-ghc (The Haskell Tool Stack (stack exec -- ghc))
750 | stack-runhaskell (The Haskell Tool Stack (stack exec -- runhaskell))
751 |
752 | html:
753 | arora (Arora)
754 | chrome (Google Chrome)
755 | chromium (Chromium)
756 | epiphany (Epiphany)
757 | firefox (Mozilla Firefox)
758 | ie (Microsoft Internet Explorer)
759 | konqueror (Konqueror)
760 | opera (Opera)
761 |
762 | IDL(Interactive Data Language):
763 | idl (ITT Visual Information Solutions Interactive Data Language)
764 | gdl (GNU Data Language incremental compiler)
765 |
766 | Java:
767 | gcj (GNU Java Compiler)
768 | sunjdk (Sun Java Development Kit)
769 |
770 | JavaScript:
771 | gjs (Javascript Bindings for GNOME)
772 | js (SpiderMonkey, a JavaScript engine written in C)
773 | node.js (node.js)
774 | rhino (Rhino, a JavaScript engine written in Java)
775 |
776 | ksh:
777 | ksh (Korn Shell)
778 |
779 | LaTeX:
780 | latex (LaTeX)
781 | pdflatex (pdfLaTeX)
782 | latexmk (Automatic LaTeX document generation routine)
783 |
784 | LISP:
785 | clisp (GNU CLISP)
786 | ecl (Embeddable Common-Lisp)
787 | gcl (GNU Common Lisp)
788 |
789 | LiveScript:
790 | lsc (LiveScript)
791 |
792 | lua:
793 | lua (Lua Interpreter)
794 |
795 | Makefile:
796 | gmake (GNU Make)
797 | nmake (Microsoft Program Maintenance Utility)
798 | mingw32-make (MinGW32 Make)
799 |
800 | Markdown:
801 | markdown (text-to-HTML conversion tool)
802 | rdiscount (Discount Markdown Processor for Ruby)
803 | Markdown (Python implementation of the Markdown language)
804 |
805 | Matlab:
806 | matlab (MathWorks MATLAB)
807 | Note: For Matlab, I highly recommend you to try out vim-matlab-behave plugin: https://github.com/elmanuelito/vim-matlab-behave
808 | octave (GNU Octave)
809 |
810 | Object-C:
811 | clang (the Clang C and Objective-C compiler)
812 | gcc (GNU Object-C Compiler)
813 |
814 | OCaml:
815 | ocaml (OCaml)
816 |
817 | Pascal:
818 | fpc (Free Pascal Compiler)
819 | gpc (GNU Pascal Compiler)
820 |
821 | perl:
822 | perl (Perl Interpreter)
823 |
824 | PHP:
825 | php (PHP Command Line Interface 'CLI')
826 |
827 | python:
828 | ironpython (IronPython)
829 | jython (Jython)
830 | pypy (PyPy)
831 | python (Python Interpreter, usually the system default Python, no matter it is Python 2 or 3.)
832 | python2 (Python 2 Interpreter)
833 | python3 (Python 3 Interpreter)
834 |
835 | QML:
836 | qmlscene (QML Scene, for viewing QML based on QtQuick 2)
837 | qmlviewer (QML Viewer, for viewing QML based on QtQuick 1)
838 | Note: vim does not detect qml files out of the box.
839 | See https://github.com/peterhoeg/vim-qml
840 |
841 | R:
842 | R (R)
843 |
844 | reStructuredText:
845 | rst2html (reST to HTML)
846 |
847 | ruby:
848 | ruby (Ruby Interpreter)
849 | jruby (Ruby on top of Java JVM, default mode)
850 | jruby1.8 (Ruby on top of Java JVM, Ruby 1.8 mode)
851 | jruby1.9 (Ruby on top of Java JVM, Ruby 1.9 mode)
852 | jruby2.0 (Ruby on top of Java JVM, Ruby 2.0 mode, requires JRuby 1.7.4 or
853 | later)
854 |
855 | rust:
856 | rustc (Rust compiler)
857 |
858 | scala:
859 | scala (Scala compiler)
860 | Note: vim does not detect scala files out the box.
861 | See https://github.com/bjartek/scala-vim-support
862 |
863 | sh:
864 | ash (Almquist Shell)
865 | bash (Bourne-Again Shell)
866 | dash (Debian Almquist Shell)
867 | ksh (Korn Shell)
868 | sh (Bourne Shell)
869 | zsh (Z Shell)
870 |
871 | tcl:
872 | tclsh (Simple shell containing Tcl interpreter)
873 |
874 | tcsh:
875 | tcsh (TENEX C Shell)
876 |
877 | vb script:
878 | vb (VB Script Interpreter)
879 |
880 | xhtml:
881 | arora (Arora)
882 | chrome (Google Chrome)
883 | epiphany (Epiphany)
884 | firefox (Mozilla Firefox)
885 | ie (Microsoft Internet Explorer)
886 | konqueror (Konqueror)
887 | opera (Opera)
888 |
889 | zsh:
890 | zsh (Z Shell)
891 |
892 |
893 | See |SingleCompile-add-your-compiler| to add your compiler support.
894 |
895 |
896 | SUPPORTINGS~
897 | *SingleCompile-supporting-plugins*
898 | ----------------------------------------------------------------------------
899 | There are some supporting code in this plugin for Marc Weber's
900 | vim-addon-actions:
901 | http://github.com/MarcWeber/vim-addon-actions
902 |
903 |
904 | ADVANCED~
905 | *SingleCompile-advanced*
906 | ----------------------------------------------------------------------------
907 | This chapter is for advanced users.
908 |
909 | *SingleCompile-custom-compiler-detecting*
910 | SingleCompile allows you to custom compiler detecting function by yourself.
911 |
912 | In |SingleCompile-compiler-template|, the following function is introduced:
913 | >
914 | call SingleCompile#SetCompilerTemplate('filetype', 'compiler',
915 | \'compiler_name', 'command', 'flag', 'run_command')
916 | <
917 |
918 | However, in fact, the function SingleCompile#SetCompilerTemplate could have a
919 | seventh parameter. The seventh parameter is a |Funcref| which references to a
920 | compiler detecting function. The compiler detecting function will be called in
921 | the function SingleCompile#SetCompilerTemplate. The compiler detecting
922 | function must accept one parameter, which would be passed in the "command"
923 | parameter in SingleCompile#SetCompilerTemplate, and return a detected compiler
924 | command if detected, which will be used as the compiling command by
925 | SingleCompile, or returns 0 if the compiler is not detected. Thus, it is more
926 | powerful to detect some compilers. If the seventh parameter is omitted, the
927 | function will use a built-in default compiler detecting function instead. The
928 | default function would check whether the "command" is in PATH, ~/bin,
929 | /usr/local/bin, /usr/bin, /bin on UNIX and whether it is in PATH on other
930 | OSes, and returns the full path of the command if it is not in PATH. If the
931 | command is not detected, the default function would return 0.
932 |
933 | Here is a short example excerpted from built-in template(OpenWatcom detecting
934 | function):
935 | >
936 | function! s:DetectWatcom(compiling_command)
937 | let l:watcom_command =
938 | \SingleCompile#DetectCompilerGenerally(a:compiling_command)
939 | if l:watcom_command != 0
940 | return l:watcom_command
941 | endif
942 |
943 | if $WATCOM != ''
944 | return $WATCOM.'\binnt\'.a:compiling_command
945 | endif
946 | endfunction
947 | <
948 | SingleCompile#DetectCompilerGenerally is the default compiler detecting
949 | function introduced in the above paragraph. This function first uses a general
950 | way to detect the compiler. If the general way can not detect it, it check the
951 | environment varible "$WATCOM" to get the compiler's installation directory and
952 | get the full path of the compiling program.
953 |
954 | *SingleCompile-predo-postdo*
955 | *SingleCompile-predo*
956 | *SingleCompile-postdo*
957 | *SingleCompile#SetPredo*
958 | *SingleCompile#SetPostdo*
959 | "Predo" and "Postdo" features allow you to initialize the compiler before
960 | compiling and clean up after compiling in you own way.
961 |
962 | "Predo" feature allows you to define a function, which would be called before
963 | compiling by SingleCompile, all by yourself. In the same way, "Postdo" feature
964 | allows you to define a function called by SingleCompile after compiling. Your
965 | "Predo" or "Postdo" function should accept one parameter, which would be
966 | passed in a dictionary containing compiling information, and return a new
967 | compiling information modified in the function by you. SingleCompile will use
968 | the new compiling information in its following work. The dictionary passed in
969 | is like this: >
970 | {"command": "the-compiling-command", "args": "the-compiling-argument"}
971 | >
972 | Then modify the dictionary to meet your need and return the modified
973 | dictionary. If you don't want to modify the dictionary, please return the
974 | parameter passed in directly.
975 |
976 | The two functions below provide a way to set the "Predo" and "Postdo"
977 | functions:
978 | >
979 | call SingleCompile#SetPredo('filetype', 'compiler',
980 | \function('your_predo_function'))
981 | call SingleCompile#SetPostdo('filetype', 'compiler',
982 | \function('your_postdo_function'))
983 | <
984 |
985 | Example: OpenWatcom's "Predo" and "Postdo" functions:
986 | >
987 | " pre-do
988 | function! s:PredoWatcom(compiling_info)
989 | let s:old_path = $PATH
990 | let $PATH = $WATCOM.s:GetPathSeperator().'binnt'.s:GetEnvSeperator().
991 | \$WATCOM.s:GetPathSeperator().'binw'.s:GetEnvSeperator().
992 | \$PATH
993 | return a:compiling_info
994 | endfunction
995 |
996 | " post-do
997 | function! s:PostdoWatcom(compiling_info) " watcom pre-do {{{2
998 | let $PATH = s:old_path
999 | return a:compiling_info
1000 | endfunction
1001 |
1002 | call SingleCompile#SetPredo('c', 'open-watcom', function('s:PredoWatcom'))
1003 | call SingleCompile#SetPostdo('c', 'open-watcom', function('s:PostdoWatcom'))
1004 | <
1005 | As you see, the OpenWatcom "Predo" function first saves the current PATH
1006 | environment varible, then modifies $PATH to meet the OpenWatcom compiler needs.
1007 | It returns the original compiling info because it does not need to modify it.
1008 | The OpenWatcom "Postdo" function restores the original $PATH. After defining
1009 | the two functions, the example calls "SetPredo" and "SetPostdo" function to
1010 | set the functions as the "Predo" function and "Postdo" function for
1011 | corresponding language and compiler.
1012 |
1013 |
1014 | To make it less confusing, I better explain the calling order here. The
1015 | calling order is: first the compiler detecting function, then "Predo"
1016 | function, then compile, and the last is the "Postdo" function.
1017 |
1018 | *SingleCompile-vim-compiler*
1019 | *SingleCompile#SetVimCompiler*
1020 | SingleCompile can work with the compiler feature of vim(see |:compiler|). To
1021 | set the compiler file in the compiler direcotry for a compiler, use
1022 | SingleCompile#SetVimCompiler function. For example, for g77, the GNU Fortran
1023 | 77 compiler, use the following line to set the compiler file for g77:
1024 | >
1025 | call SingleCompile#SetVimCompiler('fortran', 'g77', 'fortran_g77')
1026 | <
1027 | (This line is excerpted from the built-in templates.)
1028 |
1029 | Then if we are using g77 as our compiler, SingleCompile will first execute
1030 | ":compiler fortran_g77" before compiling the source file. This will give us
1031 | the advantage that vim's quickfix will recognize the messages output by g77
1032 | and help us locate these errors quickly.
1033 |
1034 | *SingleCompile-priority*
1035 | *SingleCompile#SetPriority*
1036 | Since version 2.9, every compiler template could be assigned a priority value.
1037 | This value determines which compiler to use when seversal compilers has been
1038 | detected. Use the following line to set a compiler's priority:
1039 | >
1040 | call SingleCompile#SetPriority('language_name', 'compiler_name', priority)
1041 | <
1042 | The parameter "priority" is an integer. The smaller the parameter "priority"
1043 | is, the higher priority the compiler has. For example, the following two lines
1044 | set two Fortran compilers' priorities (The two lines are excerpted from the
1045 | built-in template):
1046 | >
1047 | call SingleCompile#SetPriority('fortran', 'gfortran', 70)
1048 | call SingleCompile#SetPriority('fortran', 'ifort', 80)
1049 | <
1050 | After executing the two lines above, if ifort (which is Intel Fortran
1051 | Compiler) and gfortran (GNU fortran compiler) are both detected by
1052 | SingleCompile, and the user does not call |SingleCompile#ChooseCompiler| to
1053 | choose a compiler explicitly, SingleCompile will choose gfortran as the
1054 | current compiler.
1055 |
1056 | CREDITS~
1057 | *SingleCompile-credits*
1058 | ----------------------------------------------------------------------------
1059 | Marc Weber Integrated SingleCompile with vim-addon-actions, and some other
1060 | improvements
1061 | Darek Fixed a directory switching bug
1062 | sky hi Provided DMD compiler for D language built-in template
1063 | Zhou Yichao Made several improvements and fixed several bugs.
1064 |
1065 |
1066 | TODO~
1067 | *SingleCompile-todo*
1068 | ----------------------------------------------------------------------------
1069 | Add asynchronous compilation support.
1070 |
1071 | If "tee" is used when we are executing ":make" command, currently we can't get
1072 | the exit code of the compiler. We need to fix this.
1073 |
1074 | When running compiled program, if "tee" is used for redirecting, things
1075 | written to stdout are not printed as if what happens when stdout is a tty.
1076 | This need to be fixed.
1077 |
1078 | Make it possible to store compiler template in config files, such as ini
1079 | files.
1080 |
1081 | Reduce startup time and shrink memory use.
1082 |
1083 | vim:ts=4:ft=help:tw=78:et
1084 |
--------------------------------------------------------------------------------
/mkzip.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | zip SingleCompile.zip autoload/*.vim autoload/SingleCompile/templates/*.vim plugin/*.vim doc/*.txt
4 |
--------------------------------------------------------------------------------
/plugin/SingleCompile.vim:
--------------------------------------------------------------------------------
1 | " Copyright (C) 2010-2014 Hong Xu
2 |
3 | " This file is part of SingleCompile.
4 |
5 | " SingleCompile is free software: you can redistribute it and/or modify
6 | " it under the terms of the GNU General Public License as published by
7 | " the Free Software Foundation, either version 3 of the License, or
8 | " (at your option) any later version.
9 |
10 | " SingleCompile is distributed in the hope that it will be useful,
11 | " but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | " GNU General Public License for more details.
14 |
15 | " You should have received a copy of the GNU General Public License
16 | " along with SingleCompile. If not, see .
17 |
18 | " File: plugin/SingleCompile.vim
19 | " GetLatestVimScripts: 3115 1 SingleCompile.zip
20 | " version 2.12.0
21 | " check doc/SingleCompile.txt for more version information
22 |
23 | if v:version < 700
24 | finish
25 | endif
26 |
27 | " check whether this script is already loaded
28 | if exists("g:loaded_SingleCompile")
29 | finish
30 | endif
31 | let g:loaded_SingleCompile = 1
32 |
33 | let s:saved_cpo = &cpo
34 | set cpo&vim
35 |
36 |
37 | " commands {{{1
38 | command -nargs=* SCCompile
39 | \ if == '' | call SingleCompile#Compile() |
40 | \ else | call SingleCompile#Compile() | endif
41 | command -nargs=* SCCompileRun
42 | \ if == '' | call SingleCompile#CompileRun() |
43 | \ else | call SingleCompile#CompileRun() | endif
44 | command -nargs=* SCCompileRunAsync
45 | \ if == '' | call SingleCompile#CompileRunAsync() |
46 | \ else | call SingleCompile#CompileRunAsync() | endif
47 | command -nargs=* SingleCompile
48 | \ if == '' | call SingleCompile#Compile() |
49 | \ else | call SingleCompile#Compile() | endif
50 | command -nargs=* SingleCompileRun
51 | \ if == '' | call SingleCompile#CompileRun() |
52 | \ else | call SingleCompile#CompileRun() | endif
53 | command -nargs=+ SCCompileAF
54 | \ call SingleCompile#Compile('AdditionalFlags', )
55 | command -nargs=+ SCCompileRunAF
56 | \ call SingleCompile#CompileRun('AdditionalFlags', )
57 | command -nargs=+ SCCompileRunAsyncAF
58 | \ call SingleCompile#CompileRunAsync('AdditionalFlags', )
59 | command SCIsRunningAsync
60 | \ if SingleCompileAsync#IsRunning() == 1 |
61 | \ echo 'The background process is running.' |
62 | \ else |
63 | \ echo 'The background process is not running.' |
64 | \ endif
65 | command SCTerminateAsync
66 | \ if SingleCompileAsync#Terminate() |
67 | \ echohl ErrorMsg |
68 | \ echo 'Failed to terminate the background process!' |
69 | \ echohl None |
70 | \ else |
71 | \ echo 'Background process terminated.' |
72 | \ endif
73 | command SCChooseCompiler call SingleCompile#ChooseCompiler(&filetype)
74 | command SCChooseInterpreter call SingleCompile#ChooseCompiler(&filetype)
75 | command SCViewResult call SingleCompile#ViewResult(0)
76 | command SCViewResultAsync call SingleCompile#ViewResult(1)
77 |
78 | " menus {{{1
79 |
80 | if !exists('g:SingleCompile_menumode')
81 | let g:SingleCompile_menumode = 1
82 | endif
83 |
84 | if has('gui_running') && has('menu')
85 | if g:SingleCompile_menumode == 1
86 | let s:menu_root = 'Plugin.SingleCompile'
87 | elseif g:SingleCompile_menumode == 2
88 | let s:menu_root = 'SingleCompile'
89 | endif
90 |
91 | " if g:SingleCompile_menumode is not 1 or 2, then we don't need to create
92 | " menu
93 | if g:SingleCompile_menumode == 1 || g:SingleCompile_menumode == 2
94 | for s:menu_textcmd in [
95 | \ '&Compile:SCCompile '.
96 | \ ':SCCompile',
97 | \
98 | \ 'Compile\ and\ &Run:SCCompileRun '.
99 | \ ':SCCompileRun',
100 | \
101 | \ 'Compile\ and\ Run &Asynchronously'.
102 | \ ':SCCompileRunAsync'.
103 | \ ':SCCompileRunAsync',
104 | \
105 | \ 'C&hoose\ Compiler:SCChooseCompiler '.
106 | \ ':SCChooseCompiler',
107 | \
108 | \ '&View\ Result:SCViewResult '.
109 | \ ':SCViewResult',
110 | \
111 | \ 'V&iew\ Result\ of\ Asynchronous\ Running'.
112 | \ ':SCViewResultAsync '.
113 | \ ':SCViewResultAsync',
114 | \
115 | \ '&Terminate\ the\ Background\ Asynchronous\ Process'.
116 | \ ':SCTerminateAsync '.
117 | \ ':SCTerminateAsync'
118 | \ ]
119 |
120 | for s:menu_type in ['nnoremenu', 'inoremenu', 'vnoremenu']
121 | exec s:menu_type.' '.s:menu_root.'.'.s:menu_textcmd
122 | endfor
123 | endfor
124 |
125 | unlet! s:menu_root
126 | unlet! s:menu_type
127 | unlet! s:menu_textcmd
128 | endif
129 | endif
130 |
131 | " }}}
132 |
133 |
134 | " vim-addon-actions support (activate this addon after vim-addon-actions) {{{
135 | " eg call scriptmanager#Activate(["vim-addon-actions","SingleCompile"])
136 | if exists('g:vim_actions')
137 | for cmd in ['SingleCompile','SingleCompileRun']
138 | call actions#AddAction('run '.cmd,
139 | \{'action': funcref#Function('return '.string([cmd]))})
140 | endfor
141 | endif
142 | "}}}
143 |
144 | let &cpo = s:saved_cpo
145 | unlet! s:saved_cpo
146 |
147 | " vim703: cc=78
148 | " vim:fdm=marker et ts=4 tw=78 sw=4
149 |
--------------------------------------------------------------------------------