On Monday, July 17, 2017 at 8:34:39 AM UTC-5, Tyler Akins wrote: > /quote Is your Hexmode command defined to allow a | to separate it from > another command? I.e. did you use "command -bar Hexmode ..." to define it? > > That's very interesting, and I'm glad that I asked. Yes, the command was > already defined like how you suggest. > https://github.com/fidian/hexmode/blob/master/plugin/hexmode.vim#L21 > command -bar Hexmode call ToggleHex() > > > Do you have any other suggestions for why this could be misbehaving? >
It looks like $VIMRUNTIME/plugin/gzip.vim sets 'binary' *before* reading files with extension .gz, .bz2, etc. Then a BufReadPost autocmd calls gzip#read(). I assume the code in gzip#read() was written assuming binary is still set, in fact it *may* depend on that fact (speculation). Either way, your code will turn *off* the 'binary' option to skip HexMode. It will still be off when the gzip plugin goes to read the file. I suggest modifying your code to not process the files processed by gzip at all. Don't change the 'binary' option for these files but also don't call HexMode. Perhaps add another autocmd to set a flag for the gzip file extension list, or based on the previous value of 'binary'. -- -- You received this message from the "vim_dev" 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_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
