A text editor that auto-folds parentheses?

巧了我就是萌 提交于 2019-12-04 18:45:16

I don't think it'll do your folding, but if you're using SQL Server I'd highly recommend SQL Prompt which includes a command to reformat SQL. I've found this to be a massive help when debugging/understanding huge and unwieldy stored procedures.

SmileAndNod

I have a need to do a similar thing. I posted a request for comments and suggests (an RFC you could say). The link to it is here: Stack Overflow. I'm surprised its not a standard feature in most editors.. I guess the issue is that it's harder than it looks to parse delimited blocks of text out of a stream of characters. Maybe XML and CSS will make it easier to do thins type of thing in the future.

See HideShow mode for emacs, which does exactly what you want in lisp-mode.

Edit: Nevermind, it doesn't work. ) isn't being treated as close. Leaving the answer so nobody else wastes their time trying it.

If you're willing to split the lines so there's only one open or close parenthesis on a line, you can use the User Define Language in Notepad++ and make ( and )the folder open and close, respectively. You can also define the SQL keywords and comment delimiters so they get colored. Notepad++ has SQL built in of course, but the built in definition doesn't fold on parentheses.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!