I work with CoffeeScript in Node and a browser, and I only want to compile browser-specific files.
I have vim to compile a file if it has an extension .js.coffeebut writes to the file with the extension .js.js. I can pass the arguments to the compilation command, but then I need vim to find out the file name, and then remove the extra one .js.
.js.coffee
.js.js
.js
Here is the relevant part of my vimrc file.
au BufWritePost *.js.coffee CoffeeMake!
, . , Vim CoffeeScript, . , , ( ):-)
- . coffee .js.coffee. , .js.js.
, , cake . coffee .js, . Cakefile , , - .
, vim, ,
:!cake build
.
, script , github, , , . www, , ( ) src. . Coffee .js, html. , .js, .
: