Tuesday, February 10, 2015

Re: Can someone recommend a plugin to fold python long dict spanning over many lines?

On Monday, February 9, 2015 at 10:37:33 PM UTC-6, Bao Niu wrote:
> I'm looking for a plugin in that can fold something like this:
>
> config = {
> '/': {
> 'tools.db.on': True
> },
> "/UI_JS": {
> "tools.staticdir.on": True,
> "tools.staticdir.root": os.path.abspath(os.getcwd()),
> "tools.staticdir.dir": "./UI_JS"
> },
> "/UI_CSS": {
> "tools.staticdir.on": True,
> "tools.staticdir.root": os.path.abspath(os.getcwd()),
> "tools.staticdir.dir": "./UI_CSS"
> },
> "/UI_images": {
> "tools.staticdir.on": True,
> "tools.staticdir.root": os.path.abspath(os.getcwd()),
> "tools.staticdir.dir": "./UI_images"
> },
> "/outsource_plugins": {
> "tools.staticdir.on": True,
> "tools.staticdir.root": os.path.abspath(os.getcwd()),
> "tools.staticdir.dir": "./outsource_plugins"
> },
> "/favicon.ico": {
> "tools.staticfile.on": True,
> "tools.staticfile.filename": os.path.join(os.getcwd(), "UI_images/favicon.ico"),
> "tools.staticfile.content_types": {"ico": "image/x-icon"}
> }
> }
>
>
>
>
> I am currently using SimpylFold, which is fatanstic except doesn't fold long dict like this. And google it doesn't seem to yield anything helpful.
> Thanks.

Many languages have built-in syntax-based folding if you set the foldmethod to "syntax". What language is this?

There is also marker-based folding for this sort of thing if the syntax doesn't support it.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment