如何在vim下突出显示Doxygen的降价促销? [英] How can I hightlight markdown in doxygen under vim?

查看:84
本文介绍了如何在vim下突出显示Doxygen的降价促销?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

较新版本的doxygen带有markdown支持.有没有一种简单的方法可以将markdown语法高亮添加到vim中的doxygen注释块?

另一方面,可以使用set filetype=c.doxygen

将doxygen语法添加到c文件中

解决方案

要正确执行此操作,必须通过复制语法或定义可能包含以下内容的区域来扩展Doxygen语法扩展脚本以支持Markdown语法Markdown并使用:syntax include syntax/markdown.vim包含语法.请通过此类请求与语法插件的所有者联系,甚至发送补丁.

对于您可以立即使用的实用方法,请使用我的 SyntaxRange插件提供的命令可以使用不同的语法突出显示某些范围:

:3,11SyntaxInclude markdown

通过此操作(可能是通过自定义映射来帮助使其更快),您可以按需突出显示Doxygen-Markdown范围(例如,当文本标记非常复杂以至于可以适当地突出显示语法时).

The newer version of doxygen comes with markdown support. Is there an easy way to add markdown syntax highlight to a doxygen comment block in vim?

On a side note, one can add doxygen syntax to a c file by using set filetype=c.doxygen

解决方案

To do this right, the Doxygen syntax extension script would need to be extended to support Markdown syntax, either by duplicating the syntax, or by defining regions that can include Markdown and using :syntax include syntax/markdown.vim to include the syntax. Please contact the syntax plugin's owner with such a request, or even send a patch.

For a pragmatic approach that you can immediately use, my SyntaxRange plugin provides a command that can highlight certain ranges with a different syntax:

:3,11SyntaxInclude markdown

With this (possibly aided by a custom mapping to make this faster), you can highlight Doxygen-Markdown ranges on demand (e.g. when the text markup is so complex that you would have the comfort of proper syntax highlighting).

这篇关于如何在vim下突出显示Doxygen的降价促销?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆