正如 vim doc 所说,我可以使用-b选项打开二进制文件。
-b Binary mode. File I/O will only recognize <NL> to separate
lines. The 'expandtab' option will be reset. The 'textwidth'
option is set to 0. 'modeline' is reset. The 'binary' option
is set. This is done after reading the vimrc/exrc files but
before reading any file in the arglist. See also
|edit-binary|. {not in Vi}
我使用这个命令打开 vim:
$ vim --cmd 'set et' -u NONE -b
我键入此命令以查看选项:
:set et? bin?
expandtab
binary
( et
)expandtab
选项未重置。为什么?
谢谢你的帮助!