Created
March 21, 2013 16:36
-
-
Save jdonaldson/5214479 to your computer and use it in GitHub Desktop.
scss autowrite for 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
if !exists('*SCSStocss') | |
function! SCSStocss() | |
let src = tempname() | |
let dst = substitute( bufname('%'),'.scss','.css','g' ) | |
echo 'writing css to ' . dst | |
execute "w ! sass --scss -s " . dst | |
w | |
endfunction | |
endif | |
" convert scss to css when the buffer is written | |
au! BufWriteCmd *.scss call SCSStocss() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment