Search code examples
vimeditortext-editormacvimnerdcommenter

How do I get NERDCommenter to add comments in a particular column?


NERDCommenter works like this by default:

//level1
    //level2
        //level3

How do I get to work like this?

//level1
//    level2
//        level3

Solution

  • From the documentation:

    [count]<leader>cl  
    [count]<leader>cb    |NERDComAlignedComment|  
    

    Same as |NERDComComment| except that the delimiters are aligned down the left side (cl) or both sides (cb).