On Fr, 25 Nov 2022, meine wrote:
> Sometimes I get text files with a format that is not directly human
> readable, e.g. an MS Word file. Does anyone know how to open a
> conversion-result directly in vim?
>
> I use pandoc to convert between formats. The string I use just to read a
> Word file is
>
> $ pandoc -f docx -t rst [file]filename[/filename] | less
>
> Pandoc converts the docx-file to a ReStructuredText file that can be
> read in a pager.
>
> But how do I trigger vim to open the result (instead of less)?
>
> TIA
>
> //meine
>
Hi,
check out the various BufReadCmd autocommands. As an example, you may
want to check the zipPlugin, that is distributed with vim and allows to
browse the content of zip packages:
https://github.com/vim/vim/blob/master/runtime/plugin/zipPlugin.vim
and
https://github.com/vim/vim/blob/master/runtime/autoload/zip.vim
Best,
Chris
--
--
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
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20221128080440.GA472721%40256bit.org.
Monday, November 28, 2022
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment