If you find that syntax highlighting doesn’t work on Vim on Ubuntu, then I found the easiest way to fix it was simple to install the vim-full package with:
sudo apt-get install vim-full
It was as easy as that!
You may also need to uncomment a line in your /etc/vimrc file
syntax on
THANKS MAN!!! Just what I needed!!
Thanks a lot,
I thought it was impossible to make vim recognize php, c, bash syntax
Didn’t work for me 🙁
Hey there,
Just an FYI, you only need to install vim, not vim-full; i.e..:
sudo apt-get install vim
This is because Ubuntu ships with a pared-down version of vim called (appropriately) vim-tiny. I’m sure syntax highlighting will work if you install the full deal, but it’s not necessary. see this post:
http://www.cyberciti.biz/faq/howto-install-full-vim-under-ubuntu-linux/
saves you a few MB and some dependencies. thanks for the info though … it set me on the right track.
Look, if you use a personal config file for vim it is much better to copy to another system. just do this:
cd ~
touch .vimrc
echo “syntax on” >.vimrc
Thanks for all.
The comment above regarding the config file did the trick for me. Thank you! It’s now much easier to view php files via ssh.