如何完全关闭vim的重新编码文件?

You*_*nse 4 vim file-encodings

我发现的每个与编码相关的问题都是关于如何重新编码文件.

然而,我的相反 - 我是否有可能让vim根本不重新编码文件?(以及如何,如果是这样?)

有时它是[converted]在状态行写,总是错过.但是,我的终端设置与编辑文件的编码相同,因此,我根本不需要重新编码.

seh*_*ehe 7

使用

vim -b "myfile.type"
Run Code Online (Sandbox Code Playgroud)

以二进制模式编辑.你也可以设置

:set binary
Run Code Online (Sandbox Code Playgroud)

或者如果你像我一样懒惰

:se bin
Run Code Online (Sandbox Code Playgroud)

在vim中编辑文件之前(适用于当前缓冲区)

:he `binary`


                     *'binary'* *'bin'* *'nobinary'* *'nobin'*
'binary' 'bin'      boolean (default off)
            local to buffer
            {not in Vi}
    This option should be set before editing a binary file.  You can also
    use the |-b| Vim argument.  When this option is switched on a few
    options will be changed (also when it already was on):
        'textwidth'  will be set to 0
        'wrapmargin' will be set to 0
        'modeline'   will be off
        'expandtab'  will be off
    Also, 'fileformat' and 'fileformats' options will not be used, the
    file is read and written like 'fileformat' was "unix" (a single <NL>
    separates lines).
    The 'fileencoding' and 'fileencodings' options will not be used, the
    file is read without conversion.
Run Code Online (Sandbox Code Playgroud)