tags:

views:

100

answers:

1

First poster here at SO.

I'm currently using cygwin with external gvim. I got this in my vimrc

autocmd FileType sass setlocal shiftwidth=2 tabstop=2 
map <F5> <Esc>:w<CR>:!sass %<.sass %<.css<CR><CR>

I want to work just like a normal :w while also running sass, how do i do that?

And also, when running this in my vimrc, I always have bash.exe popping out then says

c:\cygwin\bin\bash.exe -c "sass style.sass style.css"
Hit any key to close this window...

Can I get rid of "Hit any key to close this window...". I just want to run it directly without hitting any key.

+2  A: 

You may be able to do this using the :silent command:

map <F5> <Esc>:w<CR>:silent !sass %<.sass %<.css<CR><CR> 

The help for :silent says:

    ":silent" will also avoid the hit-enter prompt.  When
    using this for an external command, this may cause the
    screen to be messed up.  Use |CTRL-L| to clean it up
    then.
Greg Hewgill
waw great! thanks a lot. anyhow on making <F5> be :w ?I want it to work like a normal :w but of course with that shell command.
ragingmon