问题
What does ++ mean in vim?
For example, :e ++ff=dos. I understand e and ff=dos, just not sure how ++ fits in there.
回答1:
: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"
回答2:
++ is used to FORCE values for commands like ff,enc and others.
Use :h ++ to look this up yourself in the vim help!
来源:https://stackoverflow.com/questions/15098084/in-vim-commands