Skip to content

Losing syntax on save #15

@mauserrifle

Description

@mauserrifle

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

  1. Open the file go to the end (G). Syntax should be broken already (look at the variable colors)
  2. Go back to the first line (gg) and scroll down to the end using }. Syntax is working!
  3. Save the file (:w). Syntax is broken again

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions