问题描述
我正在调试一些大的凌乱的SQL过程,并且它们往往有很多严重嵌套的括号:
I have some big messy SQL procedures that I'm debugging, and they tend to have a lot of heavily nested parentheses:
SELECT * FROM (SELECT F1,F2 FROM TABLE1 AS X LEFT JOIN
(SELECT F9,F8 FROM (SELECT F13,F14 FROM TABLE4) AS J INNER JOIN TABLE3 ON...) AS B
ON X.F1=B.F9) AS X1
我正在寻找一个可以自动编辑的编辑器标记并可选地折叠/折叠每个设置为易于阅读的括号,例如
I'm looking for an editor that can automatically mark and optionally collapse/fold each parentheses set to ease reading, e.g.
SELECT * FROM ... AS X1
SELECT * FROM (SELECT F1,F2 FROM TABLE1 AS X LEFT JOIN ... AS B ON X.F1=B.F9) AS X1
我可以在Visual Studio中做到这一点,方法是反复按ctrl-shift-]选择一个集合,然后按ctrl-mh使其折叠。但是其中一些东西长达数百行,如果我有一个可以自动标记整个文档的编辑器,那就太好了。
I can do this in Visual Studio by repeatedly hitting ctrl-shift-] to select a set, and then ctrl-mh to collapse it. But some of these things are hundreds of lines long and it would be nice if I had an editor that could mark up the whole document automatically.
有什么建议吗?
推荐答案
请参见适用于emacs,它完全可以在lisp模式下实现您想要的功能。
See HideShow mode for emacs, which does exactly what you want in lisp-mode.
这篇关于自动折叠括号的文本编辑器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!