Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vim“格式选项”和“文件类型”_Vim - Fatal编程技术网

Vim“格式选项”和“文件类型”

Vim“格式选项”和“文件类型”,vim,Vim,我正在使用snipmate插件,我已经将文件类型设置为php.xhtml。当我的文件类型仅为php时,注释工作正常,如下所示: /** * <-- This one is add automatically after pressing * enter in insert mode or 'o' in normal mode. */ 但是如果我将它设置为php.xhtml,它似乎不再工作了。有什么我应该考虑的吗?我的fo是qrwocb。Snipmate要么只考虑复合文件类型的最后

我正在使用snipmate插件,我已经将文件类型设置为php.xhtml。当我的文件类型仅为php时,注释工作正常,如下所示:

/**
 * <-- This one is add automatically after pressing 
 * enter in insert mode or 'o' in normal mode.
 */

但是如果我将它设置为php.xhtml,它似乎不再工作了。有什么我应该考虑的吗?我的fo是qrwocb。

Snipmate要么只考虑复合文件类型的最后一部分,要么根本不适用于复合文件类型。如果设置ft=xhtml.php会发生什么?不。同样的事情。也不行。Snipmate很好用。我认为格式选项是不正确的。也许你应该编辑你的问题,删除对SnipMate的任何提及,因为你的问题似乎无关。当编辑带有html或xhtml文件类型的文档时,缩进对php注释不起作用,这是默认设置。转到并查找适用于php的替代html缩进/语法文件或适用于html的php缩进/语法文件。