How to add user defined regions with folding in Notepad++?

For version 6.5.5 and above: Under the menu “Language” there is a menuitem called “Define your language…“ In the tab “Folder & Default” is a group called “Folding in code” where you can enter an “Open”- and a “Close”-Keyword. For versions older than 6.5.5: Under the menu “View” there is a menuitem called “User-Defined Dialog…“ … Read more

How can I save text folds and folded code block data to .sublime-workspace?

First of all, There’s already a really nice plugin that does that and much more, it’s called BufferScroll Buffer Scroll is a simple Sublime Text plug-in which remembers and restores the scroll, cursor positions, also the selections, marks, bookmarks, foldings, selected syntax and optionally the color scheme. Trying to answer your question, I did a … Read more

Scala: how to merge a collection of Maps

Well, you could do: mapList reduce (_ ++ _) except for the special requirement for collision. Since you do have that special requirement, perhaps the best would be doing something like this (2.8): def combine(m1: Map, m2: Map): Map = { val k1 = Set(m1.keysIterator.toList: _*) val k2 = Set(m2.keysIterator.toList: _*) val intersection = k1 … Read more

Python code-folding in emacs?

Hideshow works out of the box and folds python code. It is built-in my version of emacs (24.3.1) I have never needed more than these commands: M-x hs-minor-mode M-x hs-hide-all M-x hs-show-all To toggle use C-c @ C-c which probably needs rebinding. You might also want to setup a hook in your .emacs file for … Read more

How can I fold content in Github markdown?

Check if this follows dear-github issue 166, which mentions: collapsible sections are supported: <details> <summary>Click to expand</summary> whatever </details> See more in this example. The key is to wrap the whole contents inside the <p>: <details><summary>stuff with *mark* **down**</summary><p> ## _formatted_ **heading** with [a](link) — {{standard 3-backtick code block omitted from here due to escaping … Read more

How to fold/unfold HTML tags with Vim

I have found zfat (or, equally, zfit) works well for folding with HTML documents. za will toggle (open or close) an existing fold. zR opens all the folds in the current document, zM effectively re-enables all existing folds marked in the document. If you find yourself using folds extensively, you could make some handy keybindings … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)