I edited the file using vim. I started another vim to edit the same file, he said that /tmp/file.swp comes out, press "R" to restore it. I decided to recover. But after that, syntax highlighting did not work on this file (other files are still in order). I tried: syntax and some commands, but didn't work.
You can try to use the following command to indicate the type of type. For example, for file c:
:set filetype=c
I just solve it in a simple way.
I find the folder in which ~ / .vim / view / and deletes the entry about the py file that I just restored ...
cd ~/.vim/view && ls -alh | grep filename_1 | awk '{print $9}' | xargs rm
, ... .
:)
vim . , . ( , , python script.)
, , , , . vim views , . , , , . .
, , , : , .. ( , / ..) vim. , , , .
:
" C syntax: :set ft=c " Java syntax: :set ft=java " Python syntax: :set ft=py " ... etc.
, , :e %, . bufread *, . , , - , - .
:e %