dongming0505 2011-05-11 20:11
浏览 101
已采纳

在TextMate PHP Bundle中自动触发语法验证

I love text mate, but sometimes I do miss some IDE features.

One of which is the ability to automatically check syntax as you type or after you hit enter or the arrow keys etc to leave a line.

in textmate's PHP Bundle you can check the syntax using the Control-Shift-V keyboard shortcut. Which is great, but That requires user input. I know some may say lazy, but I just like to maximize my coding speed and not have to stop to run checks.

is there a way to get this command to auto trigger on either Returns or leaving the current line? right now the syntax error shows up as a tootlip, could this be changed to display an error type on the line? (error as in the syntax color theme type).

  • 写回答

1条回答 默认 最新

  • doujia2463 2011-05-11 23:37
    关注

    To have the Validate Syntax command execute with each return you could record a macro. While recording, execute the validate syntax command and press return. Save your macro and give it a key equivalent of the return key. Now when you press return it's going to override the default behavior of simply inserting a return and instead run the command and then insert the return. Since you probably don't want this to always happen (for example, if you're editing non-PHP files) set the scope of the macro to source.php.

    Override Return Character

    To have the error appear within the file instead of within a tooltip, you're going to need to either edit the existing Validate Syntax command or duplicate it and use the duplicate instead, with the output set to Insert as Text instead of Show as Tool Tip.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置