Monday, 18 January 2010
Reading MS Word Documents with VIM
Put this in your .vimrc
autocmd BufReadPost *.doc %!antiword "%"
install antiword on your PC, comes with Cygwin and as a win32 executable.
then vou can do
gvim cv.doc
Remember this is READY ONLY you cannot Modify a Word Document but nevertheless very useful for fishing out the text you need from a Microsoft Word document or alternatively reading a Word document with all the advantages of Vims powerful search options
" set up vim to read MS Word documents read only
autocmd BufReadPre *.doc set ro
autocmd BufReadPre *.doc set hlsearch!
autocmd BufReadPost *.doc %!antiword "%"
autocmd BufReadPost *.doc %!antiword "%"
install antiword on your PC, comes with Cygwin and as a win32 executable.
then vou can do
gvim cv.doc
Remember this is READY ONLY you cannot Modify a Word Document but nevertheless very useful for fishing out the text you need from a Microsoft Word document or alternatively reading a Word document with all the advantages of Vims powerful search options
" set up vim to read MS Word documents read only
autocmd BufReadPre *.doc set ro
autocmd BufReadPre *.doc set hlsearch!
autocmd BufReadPost *.doc %!antiword "%"
Subscribe to Posts [Atom]
Post a Comment