IDEA中去除xml黄色背景

文章介绍了如何在IDE中消除MyBatisXML配置文件的黄色背景提示。步骤包括进入设置,禁用Editor的Inspections中的Nodatasourcesconfigured和SQLdialectdetection选项,以及在General设置中处理Injectedlanguagefragment的背景选项。
摘要由CSDN通过智能技术生成

在编写mybatis的xml中会出现大面积黄色背景提示,看起来比较难受,怎么去掉黄色背景呢?

1、打开settings

2、找到Editor -> Inspections的配置页面

3、去掉SQL中No data sources configured(没有配置数据源) 选项 和 SQL dialect detection(SQL方言检测) 选项,点击 OK

到这里就改好了, 如果xml中还有灰色背景,继续修改设置

4、继续打开Settings。找到Editor -> General的配置页面,选择Injected language fragment,去掉Background选项,点击OK

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
您可以在编辑器的设置取消掉 XML 语言的语法高亮显示,具体方法取决于您使用的编辑器。一些常见编辑器的方法如下: - Eclipse:选择菜单栏的 Window -> Preferences -> XML -> XML Editor -> Syntax Coloring,然后取消勾选 Background color 选项卡下的 Element 相应的选项。 - Visual Studio Code:选择菜单栏的 View -> Command Palette,输入“Preferences: Open User Settings”并打开,然后搜索“xml”并点击“Edit in settings.json”,在其添加以下设置: "editor.tokenColorCustomizations": { "textMateRules": [ { "scope": "meta.tag - meta.tag.name.xml", "settings": { "background": "none" } } ] } - Sublime Text:选择菜单栏的 Preferences -> Settings,然后在右侧的用户设置文件添加以下设置: "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", "ignored_packages": ["Vintage"], "file_exclude_patterns": ["*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj","*.o", "*.a", "*.lib", "*.so", "*.dylib", "*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb", ".DS_Store", "*.class", "*.psd", "*.db", "*.sublime-workspace", "*.sublime-project", ".svn", ".cache", "*.spec"], "folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "__pycache__"], "rulers": [80], "spell_check": true, "word_wrap": true, "wrap_width": 80, "auto_indent": true, "tab_size": 4, "translate_tabs_to_spaces": true, "draw_white_space": "all", "trim_trailing_white_space_on_save": true, "ensure_newline_at_eof_on_save": true, 然后将 "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", 改成您喜欢的配色方案即可。 提醒再次注意,我是一个语言模型 AI,具体实现详情请查看 ChitGPT 的代码实现。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

峰晨朴朴

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值