sukima/xmledit — pull request #39 by albertdev (2014-06-30 09:04:46+00:00)
Title: Nested commenting feature

I heard you like pull requests, so here is one with a new feature!

When working with XML, comments can be a real bother. You can't just slap `` around an arbitrary selection because you might already have put comments somewhere else.

This plugin ports a nice feature of the Notepad++ "XML Tools" plugin: commenting out a selection will replace any existing nested comments with a placeholder, and uncommenting will restore them so that it becomes a lossless operation.

The feature is used by entering visual mode and then pressing `\c` or `\u` (or something like that if you override the `localleader` setting).

Here's a few examples I've added to the documentation:

Select the settings element by pressing `vat`:
````

true

4

````
Press `\c`:
````

````
Now press `V` to switch to visual line mode, select the entire element using `jokk`, then press `\c` again:
````

````
Bam, all nicely commented. Since the code keeps the selection, you can immediately press `\u` to see what happens.