On a hosted system I logged in via SSH and edited a file with vim. Usually once I'm in insert mode I can just paste from my local clipboard into the ssh window and VIM accepts it fine, but for some reason things go wonky on this system and the text is all over the place.
I typed :set
to get the list of options and this is what came back:
--- Options ---
filetype=php history=50 ruler ttyfast viminfo='20,"50 t_Sf=^[[3%dm
helplang=en hlsearch syntax=php ttymouse=xterm2 t_Sb=^[[4%dm
backspace=indent,eol,start
comments=s1:/*,mb:*,ex:*/,://,:#
fileencoding=utf-8
fileencodings=utf-8,latin1
formatoptions=qrowcb
include=\(require\|include\)\(_once\)\?
indentexpr=GetPhpIndent()
indentkeys=0{,0},0),:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
iskeyword=@,48-57,_,192-255,$
omnifunc=phpcomplete#CompletePHP
On other systems I usually just see this:
--- Options ---
background=dark history=50 ruler ttyfast viminfo='20,"50 t_Sf=^[[3%dm
filetype=php hlsearch syntax=php ttymouse=xterm2 t_Sb=^[[4%dm
backspace=indent,eol,start
I tried adding these lines to ~/.vimrc
:
:set comments=
:set formatoptions=
:set include=
:set indentexpr=
:set indentkeys=
:set iskeyword=
:set omnifunc=
The file is being read (if there is a syntax error vim
complains) but this is not helping unset any of these options. These options are also only present when editing a .php
file.
How can I get rid of these extra options in vim without manually typing in the commands listed above every time?
set option=
syntax here, and was able to get a previously-set option shown in theset
output to stop appearing. Maybe you just have to move those commands farther down in your.vimrc
?:set paste
when pasting? Its possible their vim is loading a syntax file and so its trying to be smart.:set paste
but i will add that to my list of tricks. i think you're correct that their vim is loading a syntax file - which is apparently getting loaded after my.vimrc
, so I'm still trying to figure out how I can disable their syntax file using my.vimrc
. Thoughts?