简体   繁体   中英

++ in vim commands

What does ++ mean in vim?

For example, :e ++ff=dos . I understand e and ff=dos , just not sure how ++ fits in there.

:h ++opt for detail

The [++opt] argument can be used to force the value of 'fileformat',
'fileencoding' or 'binary' to a value for one command, and to specify the
behavior for bad characters.  The form is: >
    ++{optname}
Or: >
    ++{optname}={value}

Where {optname} is one of:      *++ff* *++enc* *++bin* *++nobin* *++edit*
    ff     or  fileformat   overrides 'fileformat'
    enc    or  encoding     overrides 'fileencoding'
    bin    or  binary       sets 'binary'
    nobin  or  nobinary     resets 'binary'
    bad             specifies behavior for bad characters
    edit            for |:read| only: keep option values as if editing
                a file

the cmd in your question:

:e ++ff=dos 

means editing the same file again with fileformat set to "dos"

++ is used to FORCE values for commands like ff , enc and others.

Use :h ++ to look this up yourself in the vim help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM