Vim Shell Command Confusion -


i'm running gvim under win 7. have alias compile less file

cnoremap less  !lessc % > %<.css 

works fine. when try put write command in front of it

 cnoremap less w<cr> !lessc % > %<.css 

it puts command string

.!essc % > %<.css 

on command line. if try command sequence directly putting

:w<cr> !lessc % > %<.css 

on command line, seems send correct command cmd.exe tells me can't open .css file writing (even if there isn't 1 present.

i've tried concatenating commands | operator worked worse.

totaly confused here. appreciate help.

thanks

if you

:set aw 

(:help 'autowrite') don't need :w before :!.

:cnoremap less w \| !lessc % > %<.css 

should work too.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -