views:

816

answers:

2

Background: I was editing a file in vim using putty over ssh. In order to copy a huge section of text to the file from windows, I just used the standard putty paste command.

Now, whenever I edit a file in vim using putty over ssh, the syntax coloring is gone, and it is all replaced with a single-color yellow.

Question: Has anyone else out there seen this happen? Is there a best-practice way to diagnose what caused this and fix it?

+2  A: 

Have you tried :set paste in vim?

niteria
+4  A: 

Try to refresh your screen by pressing Ctrl+L. If that doesn't help try :syntax sync. If that doesn't help either try saving file and reloading it using :e.

Paul