Created
December 5, 2011 11:06
-
-
Save Anderson-Juhasc/1433241 to your computer and use it in GitHub Desktop.
Auto compile lesscss with VIM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Less compile | |
autocmd FileWritePost,BufWritePost *.less :call LessCSSCompress() | |
function! LessCSSCompress() | |
let cwd = expand('<afile>:p:h') | |
let name = expand('<afile>:t:r') | |
if (executable('lessc')) | |
cal system('lessc '.cwd.'/'.name.'.less > '.cwd.'/'.name.'.css &') | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment