coffee-script.txt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. *coffee-script.txt* For Vim version 7.3
  2. =============================================================================
  3. Author: Mick Koch <kchmck@gmail.com> *coffee-script-author*
  4. License: WTFPL (see |coffee-script-license|)
  5. =============================================================================
  6. CONTENTS *coffee-script-contents*
  7. |coffee-script-introduction| Introduction and Feature Summary
  8. |coffee-script-commands| Commands
  9. |coffee-script-settings| Settings
  10. {Vi does not have any of this}
  11. =============================================================================
  12. INTRODUCTION *coffee-script*
  13. *coffee-script-introduction*
  14. This plugin adds support for CoffeeScript syntax, indenting, and compiling.
  15. Also included is an eco syntax and support for CoffeeScript in Haml and HTML.
  16. COMMANDS *coffee-script-commands*
  17. *:CoffeeMake*
  18. :CoffeeMake[!] {opts} Wrapper around |:make| that also passes options in
  19. |g:coffee_make_options| to the compiler. Use |:silent|
  20. to hide compiler output. See |:make| for more
  21. information about the bang and other helpful commands.
  22. *:CoffeeCompile*
  23. :[range]CoffeeCompile [vertical] [{win-size}]
  24. Shows how the current file or [range] is compiled
  25. to JavaScript. [vertical] (or vert) splits the
  26. compile buffer vertically instead of horizontally, and
  27. {win-size} sets the initial size of the buffer. It can
  28. be closed quickly with the "q" key.
  29. :CoffeeCompile {watch} [vertical] [{win-size}]
  30. The watch mode of :CoffeeCompile emulates the "Try
  31. CoffeeScript" live preview on the CoffeeScript web
  32. site. After making changes to the source file,
  33. exiting insert mode will cause the preview buffer to
  34. update automatically. {watch} should be given as
  35. "watch" or "unwatch," where the latter will stop the
  36. automatic updating. [vertical] is recommended, and
  37. 'scrollbind' is useful.
  38. *:CoffeeRun*
  39. :[range]CoffeeRun Compiles the file or [range] and runs the resulting
  40. JavaScript, displaying the output.
  41. SETTINGS *coffee-script-settings*
  42. You can configure plugin behavior using global variables and syntax commands
  43. in your |vimrc|.
  44. Global Settings~
  45. *g:coffee_make_options*
  46. Set default options |CoffeeMake| should pass to the compiler.
  47. >
  48. let coffee_make_options = '--bare'
  49. <
  50. *g:coffee_compile_vert*
  51. Split the CoffeeCompile buffer vertically by default.
  52. >
  53. let coffee_compile_vert = 1
  54. Syntax Highlighting~
  55. *ft-coffee-script-syntax*
  56. Trailing whitespace is highlighted as an error by default. This can be
  57. disabled with:
  58. >
  59. hi link coffeeSpaceError NONE
  60. Trailing semicolons are also considered an error (for help transitioning from
  61. JavaScript.) This can be disabled with:
  62. >
  63. hi link coffeeSemicolonError NONE
  64. Reserved words like {function} and {var} are highlighted where they're not
  65. allowed in CoffeeScript. This can be disabled with:
  66. >
  67. hi link coffeeReservedError NONE
  68. COMPILER *compiler-coffee-script*
  69. A CoffeeScript compiler is provided as a wrapper around {coffee} and can be
  70. loaded with;
  71. >
  72. compiler coffee
  73. This is done automatically when a CoffeeScript file is opened if no other
  74. compiler is loaded.
  75. =============================================================================
  76. LICENSE *coffee-script-license*
  77. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
  78. Version 2, December 2004
  79. Copyright (C) 2010 to 2011 Mick Koch <kchmck@gmail.com>
  80. Everyone is permitted to copy and distribute verbatim or modified
  81. copies of this license document, and changing it is allowed as long
  82. as the name is changed.
  83. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
  84. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  85. 0. You just DO WHAT THE FUCK YOU WANT TO.
  86. vim:tw=78:ts=8:ft=help:norl: