htmlvimsparkup

How do I separate merged html tags in vim?


How do I get this:

<body>
    <div>[cursor here]</div>
</body>

To this:

<body>
    <div>
        [cursor here]
    </div>
</body>

In a single command? I have the sparkup plugin installed but didn't come across any actions that do this


Solution

  • what about:

    inoremap <c-k> <cr><esc>O
    

    and ofc change <c-k> to whatever you like..