本文主要是介绍emacs evil-matchit实现verilog配对的代码跳转,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
- 背景
- emacs插件evil-matchit
- 参考文档
背景
vim里常使用%进行跳转。遇到代码段较长的情况,跳转方便而且有助于debug。
vim 实现begin end 配对 使用matchit插件 - 岁月长河 - 博客园
http://www.cnblogs.com/air-of-code/p/4733151.html
emacs怎么搞?
emacs插件evil-matchit
spacemacs默认是支持的。不过要手动打开minor-mode(m-x evil-matchit-mode)。
evil-matchit插件默认支持verilog。
阅读evil-matchit-verilog.el代码后,可知已经实现了大部分代码的配对。
(defvar evilmi-verilog-match-tags'(("module" () "endmodule" "MONOGAMY")("primitive" () "endprimitive" "MONOGAMY")("case" () "endcase" "MONOGAMY")("function" () "endfunction" "MONOGAMY")("specify" () "endspecify" "MONOGAMY")("table" () "endtable" "MONOGAMY")("class" () "endclass" "MONOGAMY")("program" () "endprogram" "MONOGAMY")("clocking" () "endclocking" "MONOGAMY")("property" () "endproperty" "MONOGAMY")("sequence" () "endsequence" "MONOGAMY")("package" () "endpackage" "MONOGAMY")("covergroup" () "endgroup" "MONOGAMY")("generate" () "endgenerate" "MONOGAMY")("interface" () "endinterface" "MONOGAMY")("task" () "endtask" "MONOGAMY")("fork" () ("join" "join_any" "join_none") "MONOGAMY")("begin" () "end")("`ifn?def" "`else" "`endif" "MONOGAMY")("`celldefine" () "`endcelldefine" "MONOGAMY")))
参考文档
GitHub - redguardtoo/evil-matchit: Vim matchit ported into Emacs
https://github.com/redguardtoo/evil-matchithttps://github.com/redguardtoo/evil-matchit/blob/master/evil-matchit-verilog.el
这篇关于emacs evil-matchit实现verilog配对的代码跳转的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!