-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Losing syntax on save #15
Comments
Got a temporary fix:
That brings back highlighting. Tried to make a autocmd:
But then the bottom status bar loses style :( Oh well I'm happy I can use |
Hmm I have more problems than this. I got a legacy project with horrible code. 1439 lines within one file. With syn on vim takes like 20 seconds to save the file (yes I've timed it). Vim uses 100% CPU during this 20 seconds. Within other editors like Eclipse PDT there is no slowness. The syntax highlighter seems to be going wild! With What have I tried without success:
I can't believe i'm the only one having this issue. The three machines are all debian tho. With PIV disabled the problem is solved, but no more sweet completion :( |
You've probably hit some edge case in the syntax file or another plugin. If possible if you could email me the PHP file you are using to generate this I could spend time trying to investigate / reproducing. Best, http://stevefrancia.com On Wednesday, September 19, 2012 at 2:42 PM, mauserrifle wrote:
|
Hi Steve, I have just tried an Arch Linux LiveCD (http://ctkarch.org/), so that is not Debian related. I do not lose the syntax there, but I still have the slow save and 100% CPU on the files i've sent you through e-mail. It even takes 30 seconds because its in virtualbox. The losing syntax seems Debian related and the slow saving is not Debian related. I think it's one bug, it just acts different on systems. Regards, |
Hello Steve, Ok I might have precious information. Slow savingI changed This is 100% the caus of the 20 sec saving! Saving is instant now! Changed it back to '1' to find its root cause. The bug is within line 577 of
Removing that line fixes my slow save, the same as completely disabling Currently no idea how to debug this line as I am not really a vim expert. Losing syntaxStill losing syntax highlighting on saving. Removing the following within
Gives the same syntax on loading as when I'm done saving (very gray). Same goes for removing the whole Hope this might ring a bell! Cheers, |
Same thing under OSX, vim version 7.3.672 compiled using homebrew formula and latest PIV from Vundle. For now i just removed PIV, will try to fix it this weekend. |
Glad I'm not the only one. I haven't looked into it anymore because I gave up on Vim as my primary IDE due to no intellisense autocompletion like i'm used to from Eclipse. I hope you get the problem fixed. If I need to test things, i'll be happy to! |
Hi, I think I have kind of the same problem. Not while I'm saving though, but when I'm navigating in any php file : everything becomes gray, and only things like '>' are marked in red... I have to scroll up for a while,n then stop to re-enable the correct syntax highlight. |
Ye it happens on different moments. For me it was mainly saving. Haven't touched vim anymore :( I was 'trying' vim when I found out. Surprised the bug is still there. Hope someone finds it. I have no idea where to search (except my finding above this post) |
I'm having the same issue. With editing PHP files. Only |
For those of you still having issues, you can try using something lighter than PIV. I personally switched to this one myself: https://github.com/StanAngeloff/php.vim For those looking for a really lightweight alternative, see: https://github.com/mageekguy/php.vim Of course, neither of these options support as much as PIV, but that's part of the reason why they're faster. |
Bump! Also meet same issues here.
|
remove
in ~/.spf13-vim-3/.vim/bundle/PIV/ftplugin/php.vim |
I'm using the full spf13-vim package, but I think this issue is related to PIV. When I edit most files of projects (old php code with functions only, or a big class file) I lose syntax highlighting after saving. I got a sample code to reproduce the problem:
http://pastebin.com/UCKxiPQd
The strange thing is: if i remove something like the first method (get_id) the problem is gone. When I delete the constants, the problem is gone. Not sure how to fix it myself. I assume the highlighter is breaking on some pattern but that is currently out of my league :(
Due to this bug vim is not usable for all my projects as it happens in almost all files. Hope this can be fixed!
The text was updated successfully, but these errors were encountered: