How to enable color in Vim over SSH?
Solution 1:
I suspect that you have an alias vim=vi
in ~/.bashrc
. Try this to run 'real' command, not alias:
\vim /path/to/php/file
Looks like your are running CentOS. Make sure that you installed vim-enhanced
package:
rpm -qa | grep vim
vim-minimal-7.0.109-4.el5_2.4z
vim-enhanced-7.0.109-7.el5
vim-common-7.0.109-7.el5
Solution 2:
You can tell by your version output of vim that it's vim-tiny and its' not compiled with the -syntax
option.
Also put export TERM=xterm-256color
in your bashrc to get the full benefit...
Solution 3:
You can also use sshfs
to mount the resource so that your local vim is used to edit these files.
Vim can also edit remote files. The beauty of this is that you can then edit in the comfort of your own customized and familiar vim configuration.
vi scp://[email protected]/path/to/file