Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

++ in vim commands

Tags:

vim

vi

What does ++ mean in vim?

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

like image 422
tau Avatar asked Dec 16 '22 13:12

tau


1 Answers

: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"

like image 77
Kent Avatar answered Dec 21 '22 10:12

Kent