Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
How does one set a vim option when launching from bash or another shell?
$ vim -c 'set ai'
See :h -c, :h startup and $ vim --help.
$ vim --help
-c windo <option>
vim -O -c 'windo set ai'
vim -c 'set wrap' /path/to/file.txt
vim -c 'set ai | set nowrap'
set ai nowrap
Required, but never shown