Skip to content

Instantly share code, notes, and snippets.

@hokaccha
Created September 10, 2010 05:03
Show Gist options
  • Save hokaccha/573134 to your computer and use it in GitHub Desktop.
Save hokaccha/573134 to your computer and use it in GitHub Desktop.
function! Sass_convert()
let scss = expand('%:p')
let css = substitute(scss, 'scss$', 'css', '')
let cmd = printf('sass %s %s', scss, css)
let res = system(cmd)
if res != ''
echo res
endif
endfunction
au! BufWritePost *.scss call Sass_convert()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment