[WM] Question on webmake.vim
Virr
virr at virr.net
Thu Jan 6 20:52:08 GMT 2005
Couple things I noticed about webmake.vim.
First why does the line below use <sfile>:p:h/perl.vim instead of
syntax/perl.vim ?:
syn include @htmlPerlScript <sfile>:p:h/perl.vim
If the syntax/perl.vim is used it will search for perl.vim relative to
the the runtime paths. It should work whichever syntax directory you
put webmake.vim into is. I put it in my ~/.vim/syntax/ directory and
that works.
Also the perl.vim would load for me correclty, I had to add a line:
unlet! b:current_syntax
I have attached a patch against cvs for these.
Also it suggests putting the following into your .vimrc:
" au BufNewFile,BufReadPost *.wmk so $HOME/.vim/webmake.vim
" map ,wm :w!<CR>:! webmake -R %<CR>
Instead I put this line into my ~/.vim/filetype.vim file:
au BufNewFile,BufReadPost *.wmk setf webmake
This makes it work like filetypes shipped with vim do. I figured it
was better to follow vim's lead, even if the other way worked.
I then put this into my ~/.vimrc file:
autocmd FileType webmake setlocal makeprg=webmake
That way I can just type :make like I can for c files. Works really
well, though I found like setglobal instead since tend to have my wmk
file open, and split for any of my other files I'm editting.
Of course I'm running vim 6.3, so maybe these aren't in earlier
versions (though I'm pretty sure they are in the 6.x series).
Otherwise I must say I really happy with webmake.
Darren Cole
virr at virr.net
virr at mac.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: webmake.vim.patch
Type: application/octet-stream
Size: 498 bytes
Desc: not available
Url : http://amgod.boxhost.net/pipermail/webmake-talk/attachments/20050106/804f84d7/webmake.vim.obj
-------------- next part --------------
More information about the WebMake-Talk
mailing list