简体   繁体   English

Vim为PHP Laravel刀片文件禁用Syntastic

[英]Vim Disable Syntastic For PHP Laravel Blade Files

I use Vim for my PHP Laravel framework project. 我将Vim用于我的PHP Laravel框架项目。

I just installed Syntastic in my Vim but every time I open a blade file with Vim it gives me an error. 我只是在Vim中安装了Syntastic,但是每次使用Vim打开刀片文件时,都会出现错误。

How do you disable Syntastic for blade files? 如何为刀片文件禁用Syntastic?

Blade is a Laravel specific template file.the extension is {filename}.blade.php Blade是Laravel专用的模板文件。扩展名为{filename} .blade.php

Assuming you are using vim-blade then you can change the syntax checker for syntastic using the following format: 假设你使用vim的刀片 ,那么你可以更改语法检查syntastic使用以下格式:

let g:syntastic_<filetype>_checkers = ['<checker-name>']

So you will add the following to your vimrc file: 因此,您将以下内容添加到您的vimrc文件中:

let g:syntastic_blade_checkers = []

This will set all blade filetypes to use no checkers/linters ( [] ). 这会将所有blade文件类型设置为不使用棋盘格/衬纸( [] )。

My guess however is that you do not have vim-blade installed so Vim and Syntastic are using the php filetype which is incorrect. 但是我的猜测是您没有安装vim-blade,因此Vim和Syntastic使用的是不正确的php文件类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM