Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Suggestion for answerers and OP: use filetype plugin structure for setting filetype-based things. Commented Nov 4, 2018 at 20:00
  • @D.BenKnoble: Does that mean when I leave that filetype, foldtext will be reset to default with filetype that not specify the foldtext() in their filetype plugin? Commented Nov 5, 2018 at 1:23
  • You can ensure that by setting b:undo_ftplugin properly. I use a sort of template for that; you can find examples in my dotfiles Commented Nov 5, 2018 at 1:26
  • @D.BenKnoble: Thanks, I've just added to 1st post. Can you help me to review? Commented Nov 5, 2018 at 2:53