Excerpt from: http://www.apelearn.com/bbs/thread-7146-1-1.html
The differences between ": X" and ": Wq" are as follows:
(1): Wq Mandatory Write file and exit (save and exit write and quite). Force write even if the file is not modified, and update the file's modification time.
(2): x write to File and exit. Writes only when the file is modified and updates the file modification time, otherwise the file modification time is not updated.
The two are generally not the same, but in terms of programming, editing the source file can have a significant impact. Because the file is not modified, ": Wq" forces the update of the file when it is modified,
This will allow make to compile the entire project and assume that the file has been modified, and then recompile the chain to deliver the executable file. This can have misleading consequences and, of course, unnecessary system resource costs. But like version control software generally preferred or compare file content, modification time is generally ignored.
The difference between ": Wq" and ": X" in Vim