hi Stefan:
sorry I don't know why but somehow email from you were put into SPAM here...
please see my comments in lines to better answer you.
please let me know if you have any advice.
On 06/04/2012 12:12 PM, Stefan Bittner wrote:
Hi,
as I understand your usage, files with an extension ".doc" are not
Microsoft-Word documents, but rather text files like a .txt extension.
*no that is not the case. ".doc" IS MS docs, I use following autocmd to
open MS-word docs in vim and it works just fine:
"doc to text
autocmd BufReadPre *.doc set ro
autocmd FileReadPre *.doc set ro
autocmd BufReadPre *.doc set hlsearch!
autocmd BufReadPost *.doc %!antiword "%"
autocmd FileReadPost *.doc %!antiword "%"
so my goal here is , instead of launch an external handler APP(MS office
or OOO suite), I want Utl to try open the
MS word doc ,via using these autocmd to render it, all from inside vim
-- either in a new buffer in same window or a new tab.*
What happens is that some extensions (as ".doc" is) are hard coded
into Vim which means, that utl.vim is looking for a handler that deals
with the document. In your case no one is defined.
In order to display files, for which a handler is involved, in Vim,
you can provide a handler variable with the special value "VIM". In
your case you should put the following line into you .vimrc file:
let g:utl_cfg_hdl_mt_application_msword="VIM"*
*
*I put this in .vimrc and restart it, still not working.
it seems open a new empty buffer.*
Hope that helps,
Regards,
Stefan
Am 31.05.2012 20:31, schrieb ping:
stefen:
I'm using vim Utl plugin and enjoy it.
http://www.vim.org/scripts/script.php?script_id=293
but today I run into an issue here.
so if I use this in my text:
7 habit <url:books/7\ habits\ of\ highly\ effective\ people.txt>
it works. it will jump into the folder books and open linked file in
current window for me.
while if I use this:
7 habit <url:books/7\ habits\ of\ highly\ effective\ people.doc>
it report:
No handler for media type application/msword defined yet. Entering
Setup now. <RETURN>
and i f I return it goes to the Utl help.
I already have these setup in my vimrc file:
"doc to text
autocmd BufReadPre *.doc set ro
autocmd FileReadPre *.doc set ro
autocmd BufReadPre *.doc set hlsearch!
autocmd BufReadPost *.doc %!antiword "%"
autocmd FileReadPost *.doc %!antiword "%"
so if I :open/:read a doc file it will be automatically rendered into
vim.
is there anything missed here?
copy to the vim google group if anyone else knows how-to.
thanks!
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php