]> git.r.bdr.sh - rbdr/dotfiles/blob - vim/doc/coffee-script.txt
Add simplified modules
[rbdr/dotfiles] / vim / doc / coffee-script.txt
1 *coffee-script.txt* Plugin for editing, compiling and running CoffeeScript
2
3 =============================================================================
4 Author: Mick Koch <kchmck@gmail.com> *coffee-script-author*
5 License: WTFPL (see |coffee-script-license|)
6
7 =============================================================================
8
9 CONTENTS *coffee-script-contents*
10
11 |coffee-script-introduction| Introduction and Feature Summary
12 |coffee-script-commands| Commands
13 |coffee-script-settings| Settings
14
15 {Vi does not have any of this}
16
17 =============================================================================
18
19 INTRODUCTION *coffee-script*
20 *coffee-script-introduction*
21
22 This plugin provides facilities for editing CoffeeScript, including syntax
23 highlighting, indenting and compilation. Also included is syntax support for
24 Eco templates, and handling of {text/coffeescript} in HTML.
25
26
27 COMMANDS *coffee-script-commands*
28
29 *:CoffeeMake*
30 :CoffeeMake {opts} Calls |:make!|, with 'makeprg' being "coffee -c" plus
31 any additional {opts} given. Opens the |quickfix|
32 window if there are any errors and jumps to the first
33 error. You may set |g:coffee_make_options| to specify
34 default command-line options that will always be
35 passed. By default, all compiler output is shown --
36 running with |:silent| will hide this.
37
38 *:CoffeeMake!*
39 :CoffeeMake! {opts} As with :CoffeeMake, but will not jump to the first
40 error.
41
42 *:CoffeeCompile*
43 :[range]CoffeeCompile [vertical] [{win-size}]
44 Shows how the current file or [range] will be compiled
45 to JavaScript. [vertical] (or vert) splits the
46 compile buffer vertically instead of horizontally, and
47 {win-size} sets the initial size of the buffer. It can
48 be closed quickly with the "q" key.
49
50 :CoffeeCompile {watch} [vertical] [{win-size}]
51 The watch mode of :CoffeeCompile emulates the "Try
52 CoffeeScript" live preview on the CoffeeScript web
53 site -- after making changes to the source file,
54 exiting insert mode will cause the preview buffer to
55 update automatically. {watch} should be given as
56 "watch" or "unwatch," where the latter will of course
57 stop the automatic updating. [vertical] is
58 recommended, and 'scrollbind' is useful.
59
60 *:CoffeeRun*
61 :[range]CoffeeRun Compiles the file or [range] and runs the resulting
62 JavaScript, displaying the output.
63
64
65 SETTINGS *coffee-script-settings*
66
67 You can configure plugin behavior by setting global variables or syntax
68 highlighting directives in your |vimrc|.
69
70 Global Settings~
71
72 You may set these in your |vimrc| as illustrated below.
73
74 *g:coffee_make_options* >
75 let g:coffee_make_options='--bare'
76 Always include the specified options when compiling with |:CoffeeCompile|.
77
78 Syntax Highlighting~
79 *ft-coffee-script-syntax*
80 Trailing whitespace is highlighted as an error by default. This can be
81 disabled with:
82 >
83 hi link coffeeSpaceError NONE
84
85 Trailing semicolons are also considered an error (for help transitioning from
86 JavaScript.) This can be disabled with:
87 >
88 hi link coffeeSemicolonError NONE
89
90 Reserved words like {function} and {var} are highlighted as an error in
91 contexts disallowed by CoffeeScript. This can be disabled with:
92 >
93 hi link coffeeReservedError NONE
94
95
96 =============================================================================
97
98 LICENSE *coffee-script-license*
99
100 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
101 Version 2, December 2004
102
103 Copyright (C) 2010 to 2011 Mick Koch <kchmck@gmail.com>
104
105 Everyone is permitted to copy and distribute verbatim or modified
106 copies of this license document, and changing it is allowed as long
107 as the name is changed.
108
109 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
110 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
111
112 0. You just DO WHAT THE FUCK YOU WANT TO.
113
114 vim:tw=78:ts=8:ft=help:norl: